我从mani方法启动一个普通java程序,使用 Logs.get() 打印日志,想输出到文件中,但是就是进不去.....
public static void main(String[] args) {
Log log = Logs.get();
log.debug("hello")
.......
}
log4j.rootLogger=debug,Console,D
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n
#D
log4j.appender.D = org.apache.log4j.RollingFileAppender
log4j.appender.D.File = D://logs/log.log
log4j.appender.RollingFile.MaxFileSize=1000KB
log4j.appender.RollingFile.MaxBackupIndex=30
log4j.appender.RollingFile.layout = org.apache.log4j.PatternLayout
log4j.appender.RollingFile.layout.ConversionPattern =%d [%t] %-5p [%c] - %m%n