You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Daniel Marques (Jira)" <ji...@apache.org> on 2021/01/05 22:55:00 UTC

[jira] [Created] (LOG4J2-2991) Issue with log4j2.asyncLoggerWaitStrategy

Daniel Marques created LOG4J2-2991:
--------------------------------------

             Summary: Issue with log4j2.asyncLoggerWaitStrategy
                 Key: LOG4J2-2991
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2991
             Project: Log4j 2
          Issue Type: Bug
         Environment: Log4J 2.14.0

 

OpenJDK 64-Bit Server VM; 11.0.5; 11.0.5+10-LTS; mixed mode

os.arch=amd64
os.name.yjp=Windows 10
os.name=Windows 10
os.version.yjp=10.0.17134
os.version=10.0
            Reporter: Daniel Marques


The documentation ([https://logging.apache.org/log4j/2.x/manual/async.html#SysPropsAllAsync)] states that the property "log4j2.asyncLoggerWaitStrategy" can be used to control the waiting strategy used by the asynchronous logging system.

However, setting/changing the property doesn't seem to have the desired effect.

According to the documentation ([https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties)] "beginning in Log4j 2.10, all system property names have been normalized to follow a consistent naming scheme".  While "log4j2.asyncLoggerWaitStrategy" appears to be the normalized/consistent scheme, the system doesn't appear to read that. 

The code ([https://github.com/apache/logging-log4j2/blob/d9e01a981b860aeb8834eac3eed201c686884b7a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java#L218)] refers to a property named "AsyncLoggerConfig.WaitStrategy".  Setting that appears to have the desired affect.

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)