public class SentryHandler extends Handler
| Modifier and Type | Field and Description |
|---|---|
protected String |
dsn
DSN property of the appender.
|
protected Raven |
raven
Current instance of
Raven. |
protected String |
ravenFactory
Name of the
RavenFactory being used. |
protected Map<String,String> |
tags
Tags to add to every event.
|
static String |
THREAD_ID
Name of the
Event.extra property containing the Thread id. |
| Constructor and Description |
|---|
SentryHandler()
Creates an instance of SentryHandler.
|
SentryHandler(Raven raven)
Creates an instance of SentryHandler.
|
| Modifier and Type | Method and Description |
|---|---|
protected Event |
buildEvent(LogRecord record)
Builds an Event based on the log record.
|
void |
close() |
void |
flush() |
protected static List<String> |
formatMessageParameters(Object[] parameters)
Extracts message parameters into a List of Strings.
|
protected static Event.Level |
getLevel(Level level)
Transforms a
Level into an Event.Level. |
protected void |
initRaven()
Initialises the Raven instance.
|
void |
publish(LogRecord record) |
protected void |
retrieveProperties()
Retrieves the properties of the logger.
|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic static final String THREAD_ID
Event.extra property containing the Thread id.protected Raven raven
Raven.initRaven()protected String dsn
Might be null in which case the DSN should be detected automatically.
protected String ravenFactory
RavenFactory being used.
Might be null in which case the factory should be defined automatically.
public SentryHandler()
public SentryHandler(Raven raven)
raven - instance of Raven to use with this appender.protected static Event.Level getLevel(Level level)
Level into an Event.Level.level - original level as defined in JUL.protected static List<String> formatMessageParameters(Object[] parameters)
null parameters are kept as null.
parameters - parameters provided to the logging system.protected void retrieveProperties()
protected void initRaven()
protected Event buildEvent(LogRecord record)
record - Log generated.public void close()
throws SecurityException
close in class HandlerSecurityExceptionCopyright © 2012–2014. All rights reserved.