vy commented on code in PR #4070:
URL: https://github.com/apache/logging-log4j2/pull/4070#discussion_r3782316981
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java:
##########
@@ -163,11 +166,14 @@ public LoggerContext(final String name, final Object
externalContext) {
* @param name The context name.
* @param externalContext The external context.
* @param configLocn The location of the configuration as a URI.
+ * @deprecated Use {@link #LoggerContext(String)} and {@link
#putObject(String, Object)} instead.
Review Comment:
```suggestion
* @deprecated Use {@link #LoggerContext(String)} to create a new
context, and then use {@link #putObject(String, Object)} to attach the {@code
externalContext}.
```
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java:
##########
@@ -148,8 +148,11 @@ private void initializeShutdownCallbackRegistry() {
* for the caller if a more appropriate Context can be determined.
* @param externalContext An external context (such as a ServletContext)
to be associated with the LoggerContext.
* @return The LoggerContext.
+ * @deprecated Use {@link
org.apache.logging.log4j.spi.LoggerContext#putObject(String, Object)} instead.
Review Comment:
This should point to `getObject`, not `putObject`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]