Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleSLF4J
linenumberstrue
public static final LoggerMarker loggerENTRY = LoggerFactoryMarkerFactory.getLogger(this.getClass());
final Marker entry = MarkerFactory.getDetachedMarker("ENTRY"getMarker("ENTRY");
// ... 
final Logger logger = LoggerFactory.getLogger(this.getClass());
logger.debug(entryENTRY, "Entering.");

Marker - EXIT

...

Code Block
languagejava
titleSLF4J
linenumberstrue
public static final Marker EXIT = MarkerFactory.getMarker("EXIT");
// ... 
final Logger logger = LoggerFactory.getLogger(this.getClass());
final Marker entry = MarkerFactory.getDetachedMarker("EXIT");
logger.debug(entrylogger.debug(EXIT, "Exiting.");

Marker - INVOKE

...

Code Block
languagejava
titleSLF4J
linenumberstrue
//TODOpublic static final Marker INVOKE = MarkerFactory.getMarker("INVOKE");
// ...
final Logger logger = LoggerFactory.getLogger(this.getClass());
// ...


// Generate and report invocation ID. 


final String invocationID = UUID.randomUUID().toString();
MDC.put(MDC_INVOCATION_ID, invocationID);
try {
    logger.trace(INVOKE, "Invoking asynchronously... ");
}
finally {
    MDC.remove(MDC_INVOCATION_ID);
}

// Pass invocationID as HTTP X-InvocationID header.

callDownstreamSystem(invocationID, ... );

TODO: EELF, without changing published APIs.

...