[logback-user] logging stopped, using AsyncAppender and SocketAppender
Tara Czutno
javaworkinggirl at gmail.com
Fri Feb 12 21:52:52 UTC 2016
I have 3 servers with various java process, I want all processes to write
to one log on machineA. I am doing a load test with a lot of logging, but
it appears logging from the main process has stopped. Is there a way to
check for logback status? Is the setup below the correct way to go about
having one log?
I set this up so SimpleSocketServer is running with this config:
<configuration scan="true" scanPeriod="60 seconds">
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/opt/twc/logs/ecp.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/opt/twc/logs/ecp.log.%d{yyyy-MM-dd}</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{ISO8601} %-14mdc{application} %-5level [%t]
%logger{100} - %msg%n %xEx</pattern>
<immediateFlush>false</immediateFlush>
</encoder>
</appender>
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>100000</queueSize>
<discardingThreshold>0</discardingThreshold>
<includeCallerData>true</includeCallerData>
<maxFlushTime>5000</maxFlushTime>
<appender-ref ref="FILE"/>
</appender>
<root level="DEBUG">
<appender-ref ref="ASYNC"/>
</root>
</configuration>
All other processes are running with this config:
<configuration>
<appender name="SOCKET" class="ch.qos.logback.classic.net.SocketAppender">
<remoteHost>ecplogger</remoteHost>
<port>6000</port>
<reconnectionDelay>5 seconds</reconnectionDelay>
<includeCallerData>true</includeCallerData>
<queueSize>100000</queueSize>
<eventDelayLimit>100 milliseconds</eventDelayLimit>
</appender>
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>100000</queueSize>
<discardingThreshold>0</discardingThreshold>
<includeCallerData>true</includeCallerData>
<maxFlushTime>5000</maxFlushTime>
<appender-ref ref="SOCKET"/>
</appender>
<root level="ALL">
<appender-ref ref="ASYNC"/>
</root>
</configuration>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20160212/4e040900/attachment.html>
More information about the logback-user
mailing list