[ https://issues.apache.org/jira/browse/LOG4J2-3499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532598#comment-17532598 ]
Piotr Karwasz commented on LOG4J2-3499: --------------------------------------- It's probably just a typo in your Jira ticket, not your actual configuration, but {noformat} log4j.logger.AppAuditing = _AUDIT_LOG{noformat} is not a valid logger configuration. The value of this property should start with the name of a level, e.g. {{"INFO, _AUDIT_LOG"}}. > Bridge with log4j2 and log4j configuration cannot load custom appender class > due to using lower case key name > ------------------------------------------------------------------------------------------------------------- > > Key: LOG4J2-3499 > URL: https://issues.apache.org/jira/browse/LOG4J2-3499 > Project: Log4j 2 > Issue Type: Bug > Components: Appenders > Affects Versions: 2.17.2 > Reporter: Xitiz Bhatia > Assignee: Piotr Karwasz > Priority: Major > Labels: bridge, log4j-to-log4j2-bridge, log4j2 > > Using log4j 1.x to log4j2 bridge with log4j2 2.17.2 and log4j properties, the > customer appender that was working in log4j stops working. Upon enabling > log4j debug logging, the message shown when processing the appender is: > WARN StatusLogger Unable to load plugin class name org.abc.logging.AppAuditor > with key org.abc.logging.appauditor > > It is trying to load the custom appender class as a plugin using the fully > qualified class name in lower case. It is unable to locate the class. The > system property log4j.plugin.packages was added to specify the package name > where the custom appender class is located. > > Environment information: > The log4j.properties file from log 4j 1.x has these entries for this custome > appender: > log4j.logger.AppAuditing = _AUDIT_LOG > log4j.appender._AUDIT_LOG=org.abc.logging.AppAuditor > > The custom appender class org.abc.logging.AppAuditor extends from > AppenderSkeleton and implements the custom append method. > > The client class using the custom appender: > Logger log = Logger.getLogger("AppAuditing"); > log.info(message); > > No other changes were made to log4j.properties used with log4j 1.x and all > steps were completed for log4j 1.x to log4j2 bridge migration. All other > logging works as expected with the bridge except the custom appender. This > custom appender AppAuditor also works without any issues in log4j 1.x. -- This message was sent by Atlassian Jira (v8.20.7#820007)