public static PrintStream getTraceStream(Log logger) {
try {
TRACE = Log.class.getMethod("trace", new Class[] { Object.class });
DEBUG = Log.class.getMethod("debug", new Class[] { Object.class });
INFO = Log.class.getMethod("info", new Class[] { Object.class });
WARN = Log.class.getMethod("warn", new Class[] { Object.class });
ERROR = Log.class.getMethod("error", new Class[] { Object.class });
FATAL = Log.class.getMethod("fatal", new Class[] { Object.class });
} catch(Exception e) {
if (LOG.isErrorEnabled()) {
LOG.error("Cannot init log methods", e);
}
}
return getLogStream(logger, TRACE);
}
|