日志打印
com.huawei.bsp.log.Config4Log4j
设置log4j配置文件
配置文件读取优先级顺序:1)$APP_ROOT/etc/;2)start.sh中$JVM_OPT log4j.configuration;3)RUNTIME_CENTER_PATH/etc/
com.huawei.bsp.log4j.extend.OssRollingFileAppender后台线程压缩日志文件
服务化后 com.huawei.bsp.commonlib.cbb-3.0.26.jar 框架2015/11/26日才改zip只读
应用放在etc/log4j/log4j-app.properties
log4j.rootLogger=WARN,root
log4j.logger.err=error,root
log4j.logger.out=info,root
#log4j.logger.access=WARN,access
log4j.logger.com.huawei.bsp.log4operation.System=info,log4operation
log4j.additivity.access=false
log4j.additivity.com.huawei.bsp.log4operation.System=false
log4j.appender.access.Append=true
log4j.appender.access.File=log/access
log4j.appender.access.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
log4j.appender.access.layout=org.apache.log4j.PatternLayout
log4j.appender.access.MaxBackupIndex=25
log4j.appender.access.MaxFileSize=20MB
log4j.appender.access=com.huawei.bsp.log4j.extend.OssRollingFileAppender
log4j.appender.access.zipPermission=440
log4j.appender.access.logPermission=640
log4j.appender.root.Append=true
log4j.appender.root.File=log/root
log4j.appender.root.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
log4j.appender.root.layout=org.apache.log4j.PatternLayout
log4j.appender.root.MaxBackupIndex=50
log4j.appender.root.MaxFileSize=20MB
log4j.appender.root=com.huawei.bsp.log4j.extend.OssRollingFileAppender
log4j.appender.root.zipPermission=440
log4j.appender.root.logPermission=640
log4j.appender.log4operation=com.huawei.bsp.log4j.extend.OssRollingFileAppender
log4j.appender.log4operation.useNewThread4Zip=false
log4j.appender.log4operation.File=operation/log4operation-System
log4j.appender.log4operation.MaxFileSize=10MB
log4j.appender.log4operation.MaxBackupIndex=10
log4j.appender.log4operation.layout=org.apache.log4j.PatternLayout
log4j.appender.log4operation.layout.ConversionPattern=%d %p [%c] - %m%n
log4j.appender.log4operation.zipPermission=440//zip文件只读 -r--r-----
log4j.appender.log4operation.logPermission=640//.log文件可写,组内只读 -rw-r-----