log4j

log4j.properties:

log4j.rootLogger=INFO,flag

log4j.appender.flag=org.apache.log4j.ConsoleAppender   
log4j.appender.flag.layout=org.apache.log4j.PatternLayout   
log4j.appender.flag.layout.ConversionPattern=|-INFO\:%d{HH\:mm\:ss,SSS}  |-%m          |-%l %n

 

 

Mylog.java

package zhinangtuan.util;
import org.apache.log4j.Logger;
public class Mylog {
	public static Logger log = Logger.getLogger(Mylog.class);
}

 

 

 

Mylog.log.info("//进入字符编码Filter");

你可能感兴趣的:(log4j)