logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hasan Topcu <hsntp...@gmail.com>
Subject Async logging
Date Mon, 03 May 2021 20:26:09 GMT

It looks like asynchronous logger configuration is set to flush ~ every 3
minutes. But current configuration makes it difficult to troubleshoot

Is there a way of changing the log flush interval to a more sensitive one
like 3-5 seconds ?

It says that "Async Loggers will auto-flush in batches, so switch off
immediateFlush when using the async logger" , not sure still if I need to
change the " immediateFlush=true" ?


Here is the config we use :

<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="60" status="debug">
        <Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} %p
%c{1.}.%M NT:%N [%t]  %m %ex%n</Property>
        <Console name="Console-Appender" target="SYSTEM_OUT">
        <!-- Rollover log file every day or when log file reaches 100MB. -->
        <!-- Caution: changing the filePattern changes the meaning of the
time interval. -->
        <!-- Async Loggers will auto-flush in batches, so switch off
immediateFlush when using the async logger. -->
        <RollingRandomAccessFile name="RollingRandomAccessFile-Appender"
append="true" immediateFlush="false" fileName="${LOG_FILEPATH}"
                <TimeBasedTriggeringPolicy interval="1" modulate="true"
                <SizeBasedTriggeringPolicy size="100 MB"/>
            <DefaultRolloverStrategy max="99"/>
        <Logger name="org.apache.http" level="info" includeLocation="true"/>
        <Logger name="org.apache.http.wire" level="info"
        <Logger name="com.five9" level="debug" includeLocation="true"/>
        <Logger name="com.sync" level="debug" includeLocation="true"/>
        <Root level="debug">
            <!-- Minimize what is logged to the console since log messages
also go to the RollingFile log. -->
            <AppenderRef ref="Console-Appender" level="warn"/>
            <AppenderRef ref="RollingRandomAccessFile-Appender"/>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message