[ https://issues.apache.org/jira/browse/GEODE-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirk Lund updated GEODE-2644: ----------------------------- Description: Presently Geode adds and configures the LogWriterAppender and AlertAppender at runtime. These appenders cannot be specified or configured within xml. This is a request to change Geode so that these appenders can be specified and configured in a custom log4j2.xml file. Presently Geode dynamically creates, adds and removes AlertAppender and LogWriterAppender by manipulating log4j2 core API. We should move the bulk of the Appender functionality to internal classes and just leave the Appenders registered with log4j2 during the life of the JVM. This allows us to enable and configure our Appenders via log4j2.xml and control the Cache-controlled lifecycle internally without having to add and remove custom Appender instances. The code would then become simpler, we could avoid invoking log4j2 core APIs, and users would have control over configuring our use of log4j2 completely within the .xml file. Presently, a user cannot configure our AlertAppender or LogWriterAppender in log4j2.xml. was: Presently Geode adds and configures the LogWriterAppender and AlertAppender at runtime. These appenders cannot be specified or configured within xml. This is a request to change Geode so that these appenders can be specified and configured in a custom log4j2.xml file. This ticket requires GEODE-1275. Right now these appenders are added and removed by Geode when connecting or disconnecting from the DistributedSystem. When these appenders were introduced, this behavior was required to maintain previous behavior. If we refactor the appenders to add one more layer of indirection between the appender and the DS lifecycle, then this internal layer could enable/disable active appending even when the appenders are specified within log4j2.xml. > Provide ability to configure Geode appenders in log4j2.xml > ---------------------------------------------------------- > > Key: GEODE-2644 > URL: https://issues.apache.org/jira/browse/GEODE-2644 > Project: Geode > Issue Type: Improvement > Components: logging > Reporter: Kirk Lund > Labels: AlertAppender, Log4j2, LogWriterAppender, log4j2.xml > > Presently Geode adds and configures the LogWriterAppender and AlertAppender > at runtime. These appenders cannot be specified or configured within xml. > This is a request to change Geode so that these appenders can be specified > and configured in a custom log4j2.xml file. > Presently Geode dynamically creates, adds and removes AlertAppender and > LogWriterAppender by manipulating log4j2 core API. We should move the bulk of > the Appender functionality to internal classes and just leave the Appenders > registered with log4j2 during the life of the JVM. > This allows us to enable and configure our Appenders via log4j2.xml and > control the Cache-controlled lifecycle internally without having to add and > remove custom Appender instances. > The code would then become simpler, we could avoid invoking log4j2 core APIs, > and users would have control over configuring our use of log4j2 completely > within the .xml file. Presently, a user cannot configure our AlertAppender or > LogWriterAppender in log4j2.xml. -- This message was sent by Atlassian JIRA (v6.3.15#6346)