예제 #1
0
 @Test
 @Ignore
 public void testOnJms() throws Exception {
   EventTopicHome eventTopicHome = new JmsEventTopicHome();
   // EventListener loggerTopic =
   // eventTopicHome.getEventListener(LoggerService.DEFAULT_DESTINATION_NAME);
   Logger logger = loggerContext.getLogger(this.getClass().getCanonicalName());
   logger.debug("This is a test message");
 }
예제 #2
0
  @Test
  public void testOnLocal() throws Exception {
    EventTopicHome eventTopicHome = new LocalEventTopicHome();
    // EventListener loggerTopic =
    // eventTopicHome.getEventListener(LoggerService.DEFAULT_DESTINATION_NAME);
    EventSource logEventSource =
        eventTopicHome.getEventSource(LoggerService.DEFAULT_DESTINATION_NAME);

    LoggerService loggerService = new LoggerService();
    logEventSource.wireTo(loggerService);
    loggerService.setConfigLocation(centralConfigLocation);
    loggerService.init();
    loggerService.start();
    synchronized (this) {
      wait(1000);
    }
    Logger logger = loggerContext.getLogger(this.getClass().getCanonicalName());
    logger.debug("This is a test message");
  }
예제 #3
0
 /**
  * Constructor used by Logger to specify a LoggerContext.
  *
  * @param context The LoggerContext.
  * @param name The name of the Logger.
  */
 protected Category(final LoggerContext context, final String name) {
   this.logger = context.getLogger(name);
 }