Search in sources :

Example 1 with LogContextSelector

use of org.jboss.logmanager.LogContextSelector in project wildfly-core by wildfly.

the class EnvironmentRestorer method restoreLogContextSelector.

synchronized void restoreLogContextSelector() {
    if (!logContextSelectorRestored) {
        final LogContext logContext = defaultContexts.getLogContext();
        if (logContext == LogContext.getSystemLogContext()) {
            LogContext.setLogContextSelector(LogContext.DEFAULT_LOG_CONTEXT_SELECTOR);
        } else {
            LogContext.setLogContextSelector(new LogContextSelector() {

                @Override
                public LogContext getLogContext() {
                    return logContext;
                }
            });
        }
        EmbeddedLogContext.clearLogContext();
        logContextSelectorRestored = true;
    }
}
Also used : LogContext(org.jboss.logmanager.LogContext) LogContextSelector(org.jboss.logmanager.LogContextSelector)

Aggregations

LogContext (org.jboss.logmanager.LogContext)1 LogContextSelector (org.jboss.logmanager.LogContextSelector)1