You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Volkan Yazıcı <vo...@gmail.com> on 2020/10/28 10:32:21 UTC

Obtaining LoggerContext without starting it

Hello,

I use the following snippet to obtain a LoggerContext out of a config asdasd

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LoggerContext;

(LoggerContext) LogManager.getContext(
        ClassLoader.getSystemClassLoader(), false, configFileUri);

Though this causes the LoggerContext to be started implicitly. Is it
possible to obtain a LoggerContext without starting it?

Kind regards.