Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log4j2 warning #12332

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public class Log4J2NacosLoggingAdapter implements NacosLoggingAdapter {
private static final String FILE_PROTOCOL = "file";

private static final String NACOS_LOGGER_PREFIX = "com.alibaba.nacos";

private static final String NACOS_LOG4J2_PLUGIN_PACKAGE = "com.alibaba.nacos.client.logging.log4j2";


private static final String APPENDER_MARK = "ASYNC_NAMING";

private static final String LOG4J2_CLASSES = "org.apache.logging.slf4j.Log4jLogger";
Expand Down Expand Up @@ -101,7 +99,6 @@ private void loadConfiguration(String location) {

// load and start nacos configuration
Configuration configuration = loadConfiguration(loggerContext, location);
configuration.getPluginPackages().add(NACOS_LOG4J2_PLUGIN_PACKAGE);
configuration.start();

// append loggers and appenders to contextConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
-->

<Configuration status="WARN">
<Packages>
<Package name="com.alibaba.nacos.client.logging.log4j2"/>
</Packages>

<Properties>
<Property name="userHome" value="${nacosClientProperty:user.home}"/>
<Property name="logPath" value="${nacosClientProperty:JM.LOG.PATH:-${userHome}/logs}"/>
Expand Down
Loading