logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tal Liron (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-474) MongoDBProvider won't work with databases that don't have authentication set up
Date Tue, 25 Feb 2014 03:17:19 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tal Liron updated LOG4J2-474:
-----------------------------

    Attachment: MongoDbLog4jProvider.java

> MongoDBProvider won't work with databases that don't have authentication set up
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-474
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-474
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta9
>            Reporter: Tal Liron
>         Attachments: MongoDbLog4jProvider.java
>
>
> The problem is in line 178:
> {code}
> if (!database.isAuthenticated()) {
> {code}
> This assumes that isAuthenticated() returns true when authentication isn't need. However,
that is incorrect: databases without authentication configured will return false here, in
which case the provider will not be able to work them.
> I suggest simply removing this "if" (and also the "else" code from 183-187) -- if authentication
is required, errors will happen soon enough. Unfortunately the MongoDB API doesn't let you
know this until you try.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message