All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hubspot.blazar.util.LoggingHandler Maven / Gradle / Ivy

The newest version!
package com.hubspot.blazar.util;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.protobuf.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

@Singleton
public class LoggingHandler {
  private static final Logger LOG = LoggerFactory.getLogger(LoggingHandler.class);

  @Inject
  public LoggingHandler(EventBus eventBus) {
    eventBus.register(this);
  }

  @Subscribe
  public void logEvent(Message message) throws IOException {
    LOG.debug(message.toString());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy