You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Aarjav Patel (JIRA)" <ji...@apache.org> on 2017/12/06 18:26:00 UTC

[jira] [Created] (LOG4J2-2145) MongoDb appender configuration: database name is required even when not used

Aarjav Patel created LOG4J2-2145:
------------------------------------

             Summary: MongoDb appender configuration: database name is required even when not used
                 Key: LOG4J2-2145
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2145
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.10.0, 2.9.1
            Reporter: Aarjav Patel
            Priority: Minor


As shown in an example here https://logging.apache.org/log4j/2.x/manual/appenders.html#NoSQLAppender, it is possible to configure MongoDb appender without specifying the databaseName in the log4j config by providing factoryClass and factoryMethod.

However due to the @Required annotation on the databaseName field makes the configuration invalid and throwns an exception.

https://github.com/apache/logging-log4j2/blob/44db87d0e921bac3b207f575889618ced5288e5f/log4j-mongodb/src/main/java/org/apache/logging/log4j/mongodb/MongoDbProvider.java#L144



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)