private TestClassLoader getTestClassLoader() { PLoggerFactory.initialize(new Slf4jLoggerBinder()); ProfilerConfig profilerConfig = new ProfilerConfig(); profilerConfig.setApplicationServerType(ServiceType.TEST_STAND_ALONE.getName()); DefaultAgent agent = MockAgent.of(profilerConfig); return new TestClassLoader(agent); }
private void bindPLoggerFactory(PLoggerBinder binder) { final String binderClassName = binder.getClass().getName(); PLogger pLogger = binder.getLogger(binder.getClass().getName()); pLogger.info( "PLoggerFactory.initialize() bind:{} cl:{}", binderClassName, binder.getClass().getClassLoader()); // Set binder to static LoggerFactory // Should we unset binder at shutdown hook or stop()? PLoggerFactory.initialize(binder); }
@BeforeClass public static void before() { PLoggerFactory.initialize(new Slf4jLoggerBinder()); }