if (logger == null)
{
registry.put(name, logger = new Logger(name));
- logger.setLevel(Level.INFO);
+ logger.setLevel(Level.DEBUG);
}
return logger;
}
{
return isEnabled;
}
+
+ public void trace(Object o)
+ {
+ trace(o, null);
+ }
+
+ public void trace(Object o, Throwable e)
+ {
+ switch (level.level)
+ {
+ case Level.TRACE_INT:
+ log(o, e);
+ break;
+ }
+ }
public void debug(Object o)
{
switch (level.level)
{
case Priority.DEBUG_INT:
+ case Level.TRACE_INT:
log(o, e);
break;
}
{
case Priority.INFO_INT:
case Priority.DEBUG_INT:
+ case Level.TRACE_INT:
log(o, e);
break;
}
case Priority.WARN_INT:
case Priority.INFO_INT:
case Priority.DEBUG_INT:
+ case Level.TRACE_INT:
log(o, e);
break;
}
case Priority.WARN_INT:
case Priority.INFO_INT:
case Priority.DEBUG_INT:
+ case Level.TRACE_INT:
log(o, e);
break;
}
switch (level.level)
{
case Priority.ERROR_INT:
- if (appender == null)
- {
- System.err.println(s);
- return;
- }
- break;
case Priority.WARN_INT:
if (appender == null)
{
System.err.println(s);
return;
}
- break;
case Priority.INFO_INT:
- if (appender == null)
- {
- System.out.println(s);
- return;
- }
- break;
case Priority.DEBUG_INT:
+ case Level.TRACE_INT:
if (appender == null)
{
System.out.println(s);
}
break;
}
- e.printStackTrace();
+ if (e != null)
+ {
+ e.printStackTrace();
+ }
appender.append(new LoggingEvent(this, s.toString(), level));
}