public class SentryAppender
extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
| Modifier and Type | Field and Description |
|---|---|
static String |
LOGBACK_MARKER
Name of the
Event.extra property containing Maker details. |
protected ch.qos.logback.classic.Level |
minLevel
Deprecated.
use logback filters.
|
static String |
THREAD_NAME
Name of the
Event.extra property containing the Thread name. |
| Constructor and Description |
|---|
SentryAppender()
Creates an instance of SentryAppender.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent) |
protected EventBuilder |
createEventBuilder(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
Builds an EventBuilder based on the logging event.
|
protected SentryException |
createSentryExceptionFrom(ch.qos.logback.classic.spi.IThrowableProxy throwableProxy,
StackTraceInterface stackTrace)
Given a
IThrowableProxy and a StackTraceInterface return
a SentryException to be reported to Sentry. |
protected Deque<SentryException> |
extractExceptionQueue(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
Creates a sequence of
SentryExceptions given a particular ILoggingEvent. |
protected String[] |
extractPackageSimpleClassName(String canonicalClassName)
Given a
String representing a classname, return Strings
representing the package name and the class name individually. |
protected static Event.Level |
formatLevel(ch.qos.logback.classic.Level level)
Transforms a
Level into an Event.Level. |
protected static List<String> |
formatMessageParameters(Object[] parameters)
Extracts message parameters into a List of Strings.
|
void |
setMinLevel(String minLevel)
Deprecated.
use logback filters.
|
void |
stop() |
protected StackTraceElement[] |
toStackTraceElements(ch.qos.logback.classic.spi.IThrowableProxy throwableProxy)
Given a
IThrowableProxy return an array of StackTraceElements
associated with the underlying Throwable. |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final String LOGBACK_MARKER
Event.extra property containing Maker details.public static final String THREAD_NAME
Event.extra property containing the Thread name.@Deprecated protected ch.qos.logback.classic.Level minLevel
protected static List<String> formatMessageParameters(Object[] parameters)
null parameters are kept as null.
parameters - parameters provided to the logging system.protected static Event.Level formatLevel(ch.qos.logback.classic.Level level)
Level into an Event.Level.level - original level as defined in logback.protected void append(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>protected EventBuilder createEventBuilder(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
iLoggingEvent - Log generated.protected Deque<SentryException> extractExceptionQueue(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
SentryExceptions given a particular ILoggingEvent.iLoggingEvent - Information detailing a particular logging eventDeque of SentryExceptions detailing the exception chainprotected SentryException createSentryExceptionFrom(ch.qos.logback.classic.spi.IThrowableProxy throwableProxy, StackTraceInterface stackTrace)
IThrowableProxy and a StackTraceInterface return
a SentryException to be reported to Sentry.throwableProxy - Information detailing a ThrowablestackTrace - The stacktrace associated with the Throwable.SentryException object ready to be sent to Sentry.protected String[] extractPackageSimpleClassName(String canonicalClassName)
String representing a classname, return Strings
representing the package name and the class name individually.canonicalClassName - A dotted-notation string representing a class name (eg. "java.util.Date")Strings. The first of which is the package name. The second is the class name.protected StackTraceElement[] toStackTraceElements(ch.qos.logback.classic.spi.IThrowableProxy throwableProxy)
IThrowableProxy return an array of StackTraceElements
associated with the underlying Throwable.throwableProxy - Information detailing a Throwable.StackTraceElements associated w/the underlying Throwable@Deprecated public void setMinLevel(String minLevel)
minLevel - minimum level to log.public void stop()
stop in interface ch.qos.logback.core.spi.LifeCyclestop in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>Copyright © 2012–2018. All rights reserved.