You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "garydgregory (via GitHub)" <gi...@apache.org> on 2024/11/01 12:15:22 UTC
[I] Can't resolve deprecation warning for MongoDb/MongoDb4 appender (logging-log4j2)
garydgregory opened a new issue, #3151:
URL: https://github.com/apache/logging-log4j2/issues/3151
## Description
I can't avoid the warning:
```
2024-11-01T02:59:36.909352800Z main WARN The MongoDb4 Appender is deprecated, use the MongoDb Appender.
```
I wonder if I missed a migration step.
## Configuration
**Version:** 2.24.1
Microsoft Windows [Version 10.0.19045.5011]
~
openjdk version "23" 2024-09-17
OpenJDK Runtime Environment Temurin-23+37 (build 23+37)
OpenJDK 64-Bit Server VM Temurin-23+37 (build 23+37, mixed mode, sharing)
~
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\java\apache-maven-3.9.9
Java version: 17.0.12, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.12.7-hotspot
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
~
Docker version 27.3.1, build ce12230
## Logs
```
2024-11-01T02:59:36.909352800Z main WARN The MongoDb4 Appender is deprecated, use the MongoDb Appender.
```
## Reproduction
I migrated my POM from `log4j-mongodb4` to `log4j-mongodb`:
```xml
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-mongodb</artifactId>
<optional>true</optional>
</dependency>
```
and XML configuration files from `<MongoDb4>` to `<MongoDb>`:
```xml
<NoSql name="MongoDB-Client-Request">
<MongoDb
connection="mongodb://localhost:${sys:com.rs.seagull.httpmonitor.etl.MONGODB_PORT:-27017}/${sys:test.API_DB:-HmpDb}.${sys:test.API_CLIENT_REQUEST:-HmpClientRequestEvent}" />
<MessageLayout />
</NoSql>
```
but I still get the warning.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Can't resolve deprecation warning for MongoDb/MongoDb4 appender (logging-log4j2)
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #3151:
URL: https://github.com/apache/logging-log4j2/issues/3151#issuecomment-2451821610
@garydgregory,
It's a bug: we did reuse the same plugin builder for `MongoDb` and `MongoDb4`, so they both get a warning :wink:
Could you fix it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Can't resolve deprecation warning for MongoDb/MongoDb4 appender (logging-log4j2)
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory closed issue #3151: Can't resolve deprecation warning for MongoDb/MongoDb4 appender
URL: https://github.com/apache/logging-log4j2/issues/3151
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Can't resolve deprecation warning for MongoDb/MongoDb4 appender (logging-log4j2)
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on issue #3151:
URL: https://github.com/apache/logging-log4j2/issues/3151#issuecomment-2452515232
```
commit c662e6f415ca378f2dfffde6bcd56ace488a4252 (HEAD -> 2.x, origin/2.x)
Author: Gary Gregory <ga...@gmail.com>
Date: Fri Nov 1 15:10:33 2024 -0400
The MongoDb Appender shouldn't log a deprecation warning, GitHub
issue #3151
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org