log4j.properties
log4j.rootLogger = debug,stdout,D,E
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = /opt/novelServer/logs/info.log
log4j.appender.D.DatePattern='.'yyyyMMdd
log4j.appender.D.Append = true
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.File =/opt/novelServer/logs/error.log
log4j.appender.E.DatePattern='.'yyyyMMdd
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern =%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
import org.apache.log4j.Logger;
public class MpConsumer implements Runnable{
private static final Logger LOG = Logger.getLogger(MpConsumer.class);
....
public void run() {
LOG.info("MpConsumer start");
没有日志查不出问题 急死了
项目不是我写的 配置文件不知道哥们从哪抄的
大神 有没有搞过log 遇到这种情况的
帮忙看看