APISonar


com.facebook.buck.util.network.ScribeLogger.log

> com > facebook > buck > util > network > ScribeLogger > log
com APIs facebook APIs buck APIs util APIs network APIs ScribeLogger APIs log APIs

Example 1
private final ScribeLogger logger;

  private void log(BuckEvent event) {
    if (!enabled || !events.contains(event.getEventName())) {
      return;
    }

    dispatcher.submit(
        () -> {
          try {
            String message = ObjectMappers.WRITER.writeValueAsString(event);
            logger.log(category, Arrays.asList(message));
          } catch (JsonProcessingException ex) {
            LOG.warn(ex, "Failed to create Scribe message");
          }
        });
  }