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

cd.connect.logging.JsonLogEnhancer Maven / Gradle / Ivy

Go to download

core functional logging for platform - loads services to enhance each log. we recommend async logger with log4j2.

There is a newer version: 2.2
Show newest version
package cd.connect.logging;

import java.util.List;
import java.util.Map;

/**
 * These are made available by Services. I am doing this to force proper modularisation
 * because so many people (e.g. Spring) are lazy about this.
 *
 * @author Richard Vowles - https://plus.google.com/+RichardVowles
 */
public interface JsonLogEnhancer {
  /**
   * The ordering of the priority of this processor.
   *
   * @return
   */
  int getMapPriority();

  /**
   * translates information from the context into the log. Each subsystem that stores data in the context
   * should know how to map it to the log.
   *
   * Generic ones are provided (json: for example)
   *
   * @param context - the original context (from ConnectContext) - items should be removed as they are consumed
   * @param log - the json object being logged out - this is a Map
   * @param alreadyEncodedJsonObjects - json objects that are already encoded and need to be preserved
   */
  void map(Map context, Map log, List alreadyEncodedJsonObjects);

  void failed(Map context, Map log, List alreadyEncodedJsonObjects, Throwable e);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy