---
title: "How to Use Logback With Retrace"
slug: "errors-and-logs-logback"
description: "Download Stackify-log-logback via Maven, mask sensitive data, send logs through a proxy, and use advanced features like MDC and NDC."
updated: 2019-01-15T16:45:51Z
published: 2019-01-15T16:45:51Z
canonical: "docs.stackify.com/errors-and-logs-logback"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackify.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Configure Logback
## Downloads and Includes
The stackify-log-logback project is open source and hosted on GitHub [here](https://github.com/stackify/stackify-log-logback).
Maven artifacts are available in the central Maven repository within a few hours after a new release.
[https://search.maven.org/#search%7Cga%7C1%7CStackify](https://search.maven.org/#search%7Cga%7C1%7CStackify)
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.
```
com.stackify
stackify-log-logback
1.0.5
```
## Configuration
```
YOUR_ACTIVATION_KEY
YOUR_APPLICATION_NAME
YOUR_ENVIRONMENT
...
...
```
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();
```
## Masking
The Stackify appender has built-in data masking for credit cards and social security number values.
**Enable Masking:**
Add `<maskEnabled>true</maskEnabled>` inside the `<appender> ... </appender>` tag.
**Customize Masking:**
The example below has the following customizations:
1. Credit Card value masking is disabled (`<maskCreditCard>false</maskCreditCard>`)
2. IP Address masking is enabled (`<maskIP>true</maskIP>`).
3. Custom masking to remove vowels using a regex (`<maskCustom>[aeiou]</maskCustom>`)
```
YOUR_API_KEY
YOUR_APPLICATION_NAME
YOUR_ENVIRONMENT
true
false
true
true
[aeiou]
```
## 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 Retrace.