Skip to content

Commit

Permalink
Restore log4j configuration override in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Jan 17, 2024
1 parent 2713b89 commit 944eb42
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ public void configureTransformationClassLoader(final ITransformingClassLoaderBui
}

protected String[] preLaunch(String[] arguments, ModuleLayer layer) {
// do not overwrite the logging configuration if the user explicitly set another one
if (System.getProperty("log4j2.configurationFile") == null) {
// In dev, do not overwrite the logging configuration if the user explicitly set another one.
// In production, always overwrite the vanilla configuration.
if (isProduction() || System.getProperty("log4j2.configurationFile") == null) {
overwriteLoggingConfiguration(layer);
}

Expand Down

0 comments on commit 944eb42

Please sign in to comment.