https://github.com/stackify/stackify-log-log4j2
Stackify Log Appender for Log4j 2.x
https://github.com/stackify/stackify-log-log4j2
java log4j logging stackify
Last synced: 4 months ago
JSON representation
Stackify Log Appender for Log4j 2.x
- Host: GitHub
- URL: https://github.com/stackify/stackify-log-log4j2
- Owner: stackify
- License: apache-2.0
- Created: 2015-04-01T17:31:46.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-06-27T15:38:16.000Z (12 months ago)
- Last Synced: 2025-10-22T05:49:37.615Z (8 months ago)
- Topics: java, log4j, logging, stackify
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 8
- Watchers: 13
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](http://mvnrepository.com/artifact/com.stackify/stackify-log-log4j2)
## Stackify Log4j2 Logger
Log4j 2.x appender for sending log messages and exceptions to Stackify.
* **Errors and Logs Overview:** http://support.stackify.com/errors-and-logs-overview/
* **Sign Up for a Trial:** http://www.stackify.com/sign-up/
## Installation
Add it as a maven dependency:
```xml
com.stackify
stackify-log-log4j2
4.0.3
runtime
```
## Usage
Example configuration:
```xml
...
...
```
Note: *If you are logging from a device that has the stackify-agent installed, the environment setting is optional. We will use the environment associated to your device in Stackify.*
Be sure to shutdown Log4j to flush this appender of any errors and shutdown the background thread:
```java
((org.apache.logging.log4j.core.LoggerContext) org.apache.logging.log4j.LogManager.getContext(false)).stop();
```
## Masking
The Stackify appender has built-in data masking for credit cards and social security number values.
**Enable Masking:**
Add `true` inside the ` ... ` tag.
**Customize Masking:**
The example below has the following customizations:
1. Credit Card value masking is disabled (`CREDITCARD`)
2. IP Address masking is enabled (`IP`). Built in masks are `CREDITCARD`, `SSN` and `IP`.
3. Custom masking to remove vowels using a regex (`[aeiou]`)
```xml
true
CREDITCARD
SSN
IP
[aeiou]
...
...
```
## Legacy Support
For legacy support of **Java 1.6 and 1.7** use the following maven dependency:
```
com.stackify
stackify-log-log4j2
2.1.2
```
## License
Copyright 2020 Stackify, LLC.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.