Skip to content

Commit

Permalink
Merge pull request #6031 from jamezp/WFCORE-6850
Browse files Browse the repository at this point in the history
[WFCORE-6850] Set a JDKModuleLogger after the log manager is configured.
  • Loading branch information
yersan authored Jun 11, 2024
2 parents 01c05bc + 691b042 commit 9d10aa8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import org.jboss.logmanager.Configurator;
import org.jboss.logmanager.LogContext;
import org.jboss.logmanager.PropertyConfigurator;
import org.jboss.modules.Module;
import org.jboss.modules.ModuleClassLoader;
import org.jboss.modules.ModuleLoader;
import static org.wildfly.core.jar.runtime.Constants.LOG_BOOT_FILE_PROP;
Expand All @@ -66,6 +67,7 @@
import static org.wildfly.core.jar.runtime.Constants.STANDALONE_CONFIG;

import org.jboss.modules.ModuleLoggerFinder;
import org.jboss.modules.log.JDKModuleLogger;
import org.jboss.stdio.LoggingOutputStream;
import org.jboss.stdio.NullInputStream;
import org.jboss.stdio.SimpleStdioContextSelector;
Expand Down Expand Up @@ -217,6 +219,8 @@ private void configureLogging() throws IOException {
LogContext ctx = configureLogContext();
// Use our own LogContextSelector which returns the configured context.
LogContext.setLogContextSelector(() -> ctx);
// Set a new JDK module logger to replace the default NoopModuleLogger
Module.setModuleLogger(new JDKModuleLogger());

// Make sure our original stdio is properly captured.
try {
Expand Down

0 comments on commit 9d10aa8

Please sign in to comment.