[ https://issues.apache.org/jira/browse/LOG4J2-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated LOG4J2-3392: ------------------------------------ Summary: AppenderLoggingException logging any exception to a MongoDB Appender (was: Exception logging an exception with to MongoDB Appender) > 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 > > 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)