Package org.somda.sdc.common.logging
Class InstanceLogger
-
- All Implemented Interfaces:
public class InstanceLoggerLogger which adds instance specific information to every log message using the CloseableThreadContext.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringINSTANCE_ID
-
Constructor Summary
Constructors Constructor Description InstanceLogger()
-
Method Summary
Modifier and Type Method Description static LoggerwrapLogger(Logger logger, String instanceId)Wraps a logger into a proxy which adds context information to all messages. static ExtendedLoggerwrapLogger(ExtendedLogger logger, String instanceId)Wraps a logger into a proxy which adds context information to all messages. static KotlinLoggerwrapLogger(KotlinLogger logger, String instanceId)Wraps a logger into a proxy which adds context information to all messages. -
-
Method Detail
-
wrapLogger
static Logger wrapLogger(Logger logger, String instanceId)
Wraps a logger into a proxy which adds context information to all messages.
- Parameters:
logger- to wrapinstanceId- to add to all messages- Returns:
wrapped logger instance
-
wrapLogger
static ExtendedLogger wrapLogger(ExtendedLogger logger, String instanceId)
Wraps a logger into a proxy which adds context information to all messages.
- Parameters:
logger- to wrapinstanceId- to add to all messages- Returns:
wrapped logger instance
-
wrapLogger
static KotlinLogger wrapLogger(KotlinLogger logger, String instanceId)
Wraps a logger into a proxy which adds context information to all messages.
- Parameters:
logger- to wrapinstanceId- to add to all messages- Returns:
wrapped logger instance
-
-
-
-