[ https://issues.apache.org/jira/browse/LOG4J2-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory resolved LOG4J2-3392. ------------------------------------- Fix Version/s: 2.17.2 Resolution: Fixed [~ugurlu] Thank you for your report. Please test {{2.17.2-SNAPSHOT}} from a local build of the git branch {{release-2.x}} or by pointing Maven to https://repository.apache.org/content/repositories/snapshots/ > AppenderLoggingException logging any exception to a MongoDB Appender > -------------------------------------------------------------------- > > Key: LOG4J2-3392 > URL: https://issues.apache.org/jira/browse/LOG4J2-3392 > Project: Log4j 2 > Issue Type: Bug > Affects Versions: 2.16.0 > Reporter: Omer U > Assignee: Gary D. Gregory > Priority: Major > Fix For: 2.17.2 > > > Logging an exception with > LOG.warn("test log", new RuntimeException("test ex")); > > does not work and throws the following exception: > org.apache.logging.log4j.core.appender.AppenderLoggingException: Unable to > write to database in appender: Can't find a codec for class > org.apache.logging.log4j.mongodb4.MongoDb4DocumentObject. > > There's a blog post [1] providing a workaround which is rewrite of > MongoDb4Provider which causes classpath issues. > > > [1]https://blog.termian.dev/posts/log4j2-mongodb-appender/ -- This message was sent by Atlassian Jira (v8.20.1#820001)