Ejemplo n.º 1
0
  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);
  }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 @BeforeClass
 public static void before() {
   PLoggerFactory.initialize(new Slf4jLoggerBinder());
 }