Search in sources :

Example 1 with Log4j2Binder

use of com.navercorp.pinpoint.profiler.logging.Log4j2Binder in project pinpoint by naver.

the class AccessorInjectionTest method getTestClassLoader.

private TestClassLoader getTestClassLoader() {
    LoggerContext context = LogManager.getContext();
    PLoggerFactory.initialize(new Log4j2Binder(context));
    DefaultProfilerConfig profilerConfig = new DefaultProfilerConfig();
    MockApplicationContextFactory factory = new MockApplicationContextFactory();
    this.applicationContext = factory.build(profilerConfig);
    this.applicationContext.start();
    TestClassLoader testClassLoader = new TestClassLoader(applicationContext);
    testClassLoader.initialize();
    return testClassLoader;
}
Also used : MockApplicationContextFactory(com.navercorp.pinpoint.test.MockApplicationContextFactory) TestClassLoader(com.navercorp.pinpoint.test.classloader.TestClassLoader) DefaultProfilerConfig(com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig) Log4j2Binder(com.navercorp.pinpoint.profiler.logging.Log4j2Binder) LoggerContext(org.apache.logging.log4j.spi.LoggerContext)

Example 2 with Log4j2Binder

use of com.navercorp.pinpoint.profiler.logging.Log4j2Binder in project pinpoint by naver.

the class InvokeMethodInterceptorTest method before.

/**
 * Before.
 */
@BeforeClass
public static void before() {
    LoggerContext context = LogManager.getContext();
    PLoggerFactory.initialize(new Log4j2Binder(context));
}
Also used : Log4j2Binder(com.navercorp.pinpoint.profiler.logging.Log4j2Binder) LoggerContext(org.apache.logging.log4j.spi.LoggerContext) BeforeClass(org.junit.BeforeClass)

Aggregations

Log4j2Binder (com.navercorp.pinpoint.profiler.logging.Log4j2Binder)2 LoggerContext (org.apache.logging.log4j.spi.LoggerContext)2 DefaultProfilerConfig (com.navercorp.pinpoint.bootstrap.config.DefaultProfilerConfig)1 MockApplicationContextFactory (com.navercorp.pinpoint.test.MockApplicationContextFactory)1 TestClassLoader (com.navercorp.pinpoint.test.classloader.TestClassLoader)1 BeforeClass (org.junit.BeforeClass)1