Interface JsonLogEnhancer

  • All Known Implementing Classes:
    DefaultJsonLogEnhancer

    public interface JsonLogEnhancer
    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
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void failed​(java.util.Map<java.lang.String,​java.lang.String> context, java.util.Map<java.lang.String,​java.lang.Object> log, java.util.List<java.lang.String> alreadyEncodedJsonObjects, java.lang.Throwable e)  
      int getMapPriority()  
      void map​(java.util.Map<java.lang.String,​java.lang.String> context, java.util.Map<java.lang.String,​java.lang.Object> log, java.util.List<java.lang.String> alreadyEncodedJsonObjects)
      translates information from the context into the log.
    • Method Detail

      • getMapPriority

        int getMapPriority()
      • map

        void map​(java.util.Map<java.lang.String,​java.lang.String> context,
                 java.util.Map<java.lang.String,​java.lang.Object> log,
                 java.util.List<java.lang.String> alreadyEncodedJsonObjects)
        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)
        Parameters:
        context - - the original context (from ConnectContext) - items should be removed as they are consumed
        log - - the json object being logged out - this is a Map
        alreadyEncodedJsonObjects - - json objects that are already encoded and need to be preserved
      • failed

        void failed​(java.util.Map<java.lang.String,​java.lang.String> context,
                    java.util.Map<java.lang.String,​java.lang.Object> log,
                    java.util.List<java.lang.String> alreadyEncodedJsonObjects,
                    java.lang.Throwable e)