From 2685ee0321aebf44425ee17b73025dc75f62ed65 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 16 Jul 2004 17:39:51 +0000 Subject: [PATCH] log Sigar.load errors --- bindings/java/src/net/hyperic/sigar/Sigar.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/net/hyperic/sigar/Sigar.java b/bindings/java/src/net/hyperic/sigar/Sigar.java index d6972367..b12bf689 100644 --- a/bindings/java/src/net/hyperic/sigar/Sigar.java +++ b/bindings/java/src/net/hyperic/sigar/Sigar.java @@ -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(); + } } }