log Sigar.load errors

This commit is contained in:
Doug MacEachern 2004-07-16 17:39:51 +00:00
parent d1e5277554
commit 2685ee0321
1 changed files with 8 additions and 1 deletions

View File

@ -31,7 +31,14 @@ public class Sigar implements SigarProxy {
try {
load();
} catch (SigarException e) {
//will find out later when invoking methods.
String msg = "Sigar.load: " + e.getMessage();
try {
SigarLog.error(msg, e);
} catch (NoClassDefFoundError ne) {
//no log4j.jar
System.err.println(msg);
e.printStackTrace();
}
}
}