Skip to content

Commit

Permalink
Restore log4j configuration override in prod (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n authored Jan 18, 2024
1 parent 722f61d commit 697a95e
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 697a95e

Please sign in to comment.