Downloads and Includes
The stackify-log-logback project is open source and hosted on GitHub.
Maven artifacts are available in the central Maven repository within a few hours after a new release.
The group id is com.stackify. The artifact id is stackify-log-logback. Substitute the version number you wish to use in the dependency snippet below.
<dependency> <groupId>com.stackify</groupId> <artifactId>stackify-log-logback</artifactId> <version>1.1.3</version> </dependency>
<appender name="STACKIFY" class="com.stackify.log.logback.StackifyLogAppender"> <apiKey>YOUR_ACTIVATION_KEY</apiKey> <application>YOUR_APPLICATION_NAME</application> <environment>YOUR_ENVIRONMENT</environment> </appender> ... <root level=...> ... <appender-ref ref="STACKIFY" /> </root>
Be sure to shut down Logback to flush this appender of any errors and shut down the background thread:
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); loggerContext.stop();
Sending Logs Through a Proxy
If you are wanting to send your logs into Stackify through a proxy, you will want to set the 'https.proxyHost' and 'https.proxyPort' system properties. If both of these properties are set in your app, your logs go through the proxy specified.
Advanced Features: MDC, and NDC
If you're utilizing MDC (Mapped Diagnostic Context), Stackify will automatically pick up and report any data you add via MDC. This information will be available to you under the Custom Properties heading in the error details screen within Stackify.