我有四个appender,有时工作,有时不调用? 这是log4j.conf:
# Trace appender
log4j.appender.WsAppender=it.tracciaturaEventi.WsTraceAppender
log4j.appender.DbAppenderOld=it.tracciaturaEventi.DbTraceAppenderOld
log4j.appender.DBAppender=it.tracciaturaEventi.DBTraceAppender
log4j.appender.JAppender=it.tracciaturaEventi.JAppender
### trace conf
log4j.logger.it.a.b.TRACING=info, WsAppender, DbAppenderOld,DBAppender,JAppender
log4j.additivity.it.a.b.TRACING=false
log4j.logger.it.a.b.TRACING.c=info, WsAppender, JAppender
log4j.additivity.it.a.b.TRACING.c=false
log4j.logger.it.a.b.TRACING.d=info, DbAppenderOld, DBAppender
log4j.additivity.it.a.b.TRACING.d=false
这是一个类附加器
public class WsTraceAppender extends appenderSkeleton {
@Override
public void append(LoggingEvent ev) {
TraceTO msg = msg(ev);
if (msg == null) return;
try {
TraceWS.callWS(msg.properties);
} catch (Exception e) {
throw new TracingRuntimeException(e);
}
}
}
在一天之内,有时工作,完美,并且在其他日子没有被调用,我在日志中没有错误
抱歉我的英文