Package org.ops4j.pax.logging.spi
Interface PaxLoggingEvent
-
public interface PaxLoggingEventFramework library agnostic representation of logging event that may be filtered and/or directed to anappender. The methods are inspired by Log4J1 equivalents. Other frameworks don't necessarily have all the information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetFQNOfLoggerClass()Fully qualified class name (FQCN) helps identifying the location of logging statement, by examining call trace to find where user code invoked logging method.PaxLevelgetLevel()Severity/level/importance of thelogging event.PaxLocationInfogetLocationInformation()Place where the logging event was created (e.g.,log.info("message")was called).StringgetLoggerName()Name of the logger is its category (usually in dot-separated convention), usually set in factory method oflogfactory.getLog("name").StringgetMessage()Actual message carried by given logging event.Map<String,Object>getProperties()Properties associated with logging event - usually MDC.StringgetRenderedMessage()When message is not a String, rendered message is Stringified version of the message object.StringgetThreadName()Thread name associated with logging event.String[]getThrowableStrRep()Array of Strings representation of stack trace at the point where logging event was created.longgetTimeStamp()Timestamp for the moment when the logging event was created.booleanlocationInformationExists()getLocationInformation()may not always be available (e.g., when compiled without debug information).
-
-
-
Method Detail
-
getLocationInformation
PaxLocationInfo getLocationInformation()
Place where the logging event was created (e.g.,log.info("message")was called).- Returns:
-
getLevel
PaxLevel getLevel()
Severity/level/importance of thelogging event.- Returns:
-
getLoggerName
String getLoggerName()
Name of the logger is its category (usually in dot-separated convention), usually set in factory method oflogfactory.getLog("name").- Returns:
-
getFQNOfLoggerClass
String getFQNOfLoggerClass()
Fully qualified class name (FQCN) helps identifying the location of logging statement, by examining call trace to find where user code invoked logging method.- Returns:
-
getMessage
String getMessage()
Actual message carried by given logging event.- Returns:
-
getRenderedMessage
String getRenderedMessage()
When message is not a String, rendered message is Stringified version of the message object.- Returns:
-
getThreadName
String getThreadName()
Thread name associated with logging event. Usually related to thread that created the event (calledlogger.info()method).- Returns:
-
getThrowableStrRep
String[] getThrowableStrRep()
Array of Strings representation of stack trace at the point where logging event was created.- Returns:
-
locationInformationExists
boolean locationInformationExists()
getLocationInformation()may not always be available (e.g., when compiled without debug information).- Returns:
-
getTimeStamp
long getTimeStamp()
Timestamp for the moment when the logging event was created.- Returns:
-
-