com.stackify.log.logback
public class StackifyLogAppender extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Example appender configuration:
<appender name="STACKIFY" class="com.stackify.log.logback.StackifyLogAppender">
<apiKey>YOUR_API_KEY</apiKey>
<application>YOUR_APPLICATION_NAME</application>
<environment>YOUR_ENVIRONMENT</environment>
</appender>
Be sure to shutdown Logback to flush this appender of any errors and shutdown the background thread:
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); loggerContext.stop();
| Constructor and Description |
|---|
StackifyLogAppender() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(ch.qos.logback.classic.spi.ILoggingEvent event) |
String |
getApiKey() |
String |
getApiUrl() |
String |
getApplication() |
String |
getEnvironment() |
void |
setApiKey(String apiKey) |
void |
setApiUrl(String apiUrl) |
void |
setApplication(String application) |
void |
setEnvironment(String environment) |
void |
start() |
void |
stop() |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic String getApiUrl()
public void setApiUrl(String apiUrl)
apiUrl - the apiUrl to setpublic String getApiKey()
public void setApiKey(String apiKey)
apiKey - the apiKey to setpublic String getApplication()
public void setApplication(String application)
application - the application to setpublic String getEnvironment()
public void setEnvironment(String environment)
environment - the environment to setpublic void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>AppenderBase.start()protected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>AppenderBase.append(java.lang.Object)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>AppenderBase.stop()Copyright © 2014 Stackify, LLC. All Rights Reserved.