On Thu, Sep 30, 2021 at 9:29 AM Travis Spencer <[email protected]> wrote:

> 2. Is there some other way to set the LogEventFactory besides a system
> property?

I did like this:

@BeforeClass
public static void beforeClass()
{
        _context.getConfiguration().getLoggers()
                .forEach((loggerName, loggerConfig) ->
                    loggerConfig.setLogEventFactory(
                        new MyGoodLogEventFactory()));
}

@ClassRule
public static LoggerContextRule _context = new
    LoggerContextRule("myGoodConfig.xml");

Tests pass fine now.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to