|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netflix.blitz4j.LoggingContext
public class LoggingContext
The utility class that caches the context of logging such as location information.
It is expensive to find out the location information (ie) calling class, line number etc of the logger and hence caching would be useful whenever possible. This class also generates location information slightly more efficiently than log4j.
Method Summary | |
---|---|
org.apache.log4j.spi.LocationInfo |
generateLocationInfo(org.apache.log4j.spi.LoggingEvent event)
Generate the location information of the given logging event and cache it. |
static LoggingContext |
getInstance()
|
org.apache.log4j.spi.LocationInfo |
getLocationInfo(java.lang.Class wrapperClassName)
Get the location information of the calling class |
org.apache.log4j.spi.LocationInfo |
getLocationInfo(org.apache.log4j.spi.LoggingEvent event)
Get the location information of the logging event. |
java.lang.StackTraceElement |
getStackTraceElement(java.lang.Class stackClass)
Gets the starting calling stack trace element of a given stack which matches the given class name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.StackTraceElement getStackTraceElement(java.lang.Class stackClass)
stackClass
- - The class to be matched for. Get the last matching class
down the stack
public org.apache.log4j.spi.LocationInfo getLocationInfo(java.lang.Class wrapperClassName)
wrapperClassName
- - The wrapper that indicates the caller
public static LoggingContext getInstance()
public org.apache.log4j.spi.LocationInfo generateLocationInfo(org.apache.log4j.spi.LoggingEvent event)
event
- The logging event for which the location information needs to
be determined.
public org.apache.log4j.spi.LocationInfo getLocationInfo(org.apache.log4j.spi.LoggingEvent event)
event
- - The logging event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |