日志输出格式(UTF-8),若不设置输出会变成一堆问号

log4j.appender.filelog.Encoding=UTF-8

##这个文件用于Logger logger = LogManager.getLogger(XXX.class)输出log,@Slf4j无效
log4j.rootLogger=info , stdout, filelog

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.conversionPattern=[%5p] %d{yyyy-MM-dd hh:mm:ss}\
(%F:%M:%L)%n%m%n%n

log4j.appender.filelog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.filelog.File=D:/rmsLogs/log.log
log4j.appender.filelog.DatePattern='.'yyyyMMdd
log4j.appender.filelog.layout=org.apache.log4j.PatternLayout
log4j.appender.filelog.layout.ConversionPattern=%d{yyyy-MM-dd hh:mm:ss} %5p [%c:%L] - %m%n
log4j.appender.filelog.Encoding=UTF-8

你可能感兴趣的:(java,元素选择器,前端,vue.js)