https://github.com/iopipe/iopipe-java-logger-log4j2
Support for Log4j2 using the IOpipe Logger Plugin.
https://github.com/iopipe/iopipe-java-logger-log4j2
iopipe java log4j2 log4j2-appender logger logging
Last synced: about 2 months ago
JSON representation
Support for Log4j2 using the IOpipe Logger Plugin.
- Host: GitHub
- URL: https://github.com/iopipe/iopipe-java-logger-log4j2
- Owner: iopipe
- License: apache-2.0
- Created: 2018-09-28T21:14:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-26T16:28:27.000Z (about 6 years ago)
- Last Synced: 2025-02-13T13:16:47.918Z (3 months ago)
- Topics: iopipe, java, log4j2, log4j2-appender, logger, logging
- Language: Shell
- Size: 47.9 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IOpipe Logger Adapter for log4j2 (Java)
[ ](https://bintray.com/iopipe/iopipe-logger-log4j2/iopipe-logger-log4j2/_latestVersion)[](https://circleci.com/gh/iopipe/iopipe-java-logger-log4j2)[](https://www.javadoc.io/doc/com.iopipe/iopipe-logger-log4j2)
Support for [Log4j2](https://logging.apache.org/log4j/2.x/) using the IOpipe
Logger Plugin. This plugin is to be used with
the [IOpipe Java Agent](https://github.com/iopipe/iopipe-java).It is licensed under the Apache 2.0.
# Building With The Adapter
Your `pom.xml` file may be modified to include the following dependency:
```xml
com.iopipe
iopipe-logger-log4j2```
Due to the way shading works, you will be required to always use the
[Log4j2 Transformer](https://github.com/edwgiz/maven-shaded-log4j-transformer)
if you wish to support multiple appenders within your project and its
dependencies. Not doing so may result in not being able to use multiple various
plugins with Log4j2.# Configuration
Configuring your project to use this adapter for Log4j2 will be the same as
configuring other appenders as specified in the [configuration documentation](https://logging.apache.org/log4j/2.x/manual/configuration.html).Using the following as an example `log4j2.xml` resource at a very basic level
to report to IOpipe (the error level may be modified accordingly as needed):```xml
```
Once you’re setup, you will need to configure IOpipe to enable the logging plugin. You can do this by setting the `IOPIPE_LOGGER_ENABLED` environment variable to `true` in the AWS Lambda configuration.