Public Repository

Last pushed: 3 months ago
Short Description
使用log4j 基于socket的日志服务
Full Description

使用log4j 基于socket的日志服务

启动服务
sudo docker run -p 4560:4560 -v /data:/data -d coolzlay/logserver:1.0

应用的log4j.properties
log4j.rootLogger = debug , socket

log4j.logger.org.springframework=WARN
log4j.logger.org.apache.velocity=WARN
log4j.logger.org.mybatis.spring.SqlSessionUtils=WARN
log4j.logger.org.apache.commons.beanutils=WARN
log4j.logger.com.jolbox.bonecp=WARN
log4j.logger.org.aspectj=WARN
log4j.logger.org.mybatis.spring.transaction.SpringManagedTransaction=WARN
log4j.logger.org.apache.http=ERROR
log4j.logger.org.quartz=ERROR

log4j.appender.socket=org.apache.log4j.net.SocketAppender
log4j.appender.socket.RemoteHost=127.0.0.1
log4j.appender.socket.Port=4560
log4j.appender.socket.ReconnectionDelay=1000
log4j.appender.socket.LocationInfo=true
log4j.appender.socket.layout=org.apache.log4j.PatternLayout
log4j.appender.socket.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n

Docker Pull Command
Owner
coolzlay

Comments (0)