Class ExtendedLogRecord
java.lang.Object
java.util.logging.LogRecord
com.clumd.projects.java_custom_logging.logging.common.ExtendedLogRecord
- All Implemented Interfaces:
Serializable
An extended
LogRecord which also supports the notion of 'tagging' log messages.
Tagging could be used to cross-reference which could be related, but come from totally distinct loggers. For EXAMPLE, tagging with 'Security', but for messages coming from some User Input validation, vs some Socket level communication, which could then be pulled out or used as an Index in some log aggregation.
Also, with reference to so-called "bakedInTags", these should point to an additional pre-initialised, ideally Immutable Set of String tags. These additional tags should be stamped along-side any other potentially provided tags and tends to be most useful for things such as distributed compute trace IDs or things such as concrete / unchanging environment variables.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedLogRecord(Level level, String msg) ExtendedLogRecord(Level level, String msg, @NonNull String tag) ExtendedLogRecord(Level level, String msg, @NonNull Set<String> tags) -
Method Summary
Modifier and TypeMethodDescriptionSet<Class<? extends StreamHandler>> getTags()referencingBakedInTags(Set<String> bakedInTags) withControllersWhichShouldIgnore(Set<Class<? extends StreamHandler>> controllersWhichShouldDisregardThisMessage) Methods inherited from class java.util.logging.LogRecord
getInstant, getLevel, getLoggerName, getLongThreadID, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, getSourceClassName, getSourceMethodName, getThreadID, getThrown, setInstant, setLevel, setLoggerName, setLongThreadID, setMessage, setMillis, setParameters, setResourceBundle, setResourceBundleName, setSequenceNumber, setSourceClassName, setSourceMethodName, setThreadID, setThrown
-
Constructor Details
-
ExtendedLogRecord
-
ExtendedLogRecord
-
ExtendedLogRecord
-
-
Method Details
-
referencingBakedInTags
-
withControllersWhichShouldIgnore
public ExtendedLogRecord withControllersWhichShouldIgnore(Set<Class<? extends StreamHandler>> controllersWhichShouldDisregardThisMessage) -
getTags
-
getBakedInTags
-
getControllersWhichShouldDisregardThisMessage
-