-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
[[_installation]] | ||
= Installation | ||
|
||
First of all you need to add the dependency to your build file. | ||
|
||
.Gradle Installation | ||
[source,subs='verbatim,attributes'] | ||
---- | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
// load just simple implementation with POJO client and reflection based parser | ||
testCompile "com.agorapulse:micronaut-log4aws:{version}" | ||
} | ||
---- | ||
|
||
Also be sure that your build file **does not contain any referrence to Logback**: | ||
|
||
.Build File Cleanup | ||
[source,subs='verbatim,attributes'] | ||
``` | ||
dependencies { | ||
// remove following line from your build file if present | ||
runtime "ch.qos.logback:logback-classic:1.2.3" | ||
} | ||
``` | ||
|
||
Then remove Logback configuration file from `src/main/resources/logback.groovy` | ||
and replace it with a new file `log4j2.xml` with following content. Feel free to update the file to fit your needs. | ||
|
||
|
||
.Log4J2 Configuration | ||
[source,xml,subs='verbatim,attributes'] | ||
``` | ||
include::../../../../../subprojects/micronaut-log4aws/src/test/resources/log4j2.xml[lines=1;21..51] | ||
``` | ||
|
||
As a last step you need to create a file `sentry.properties` for sentry configuration - also in `src/main/resources`: | ||
|
||
.sentry.properties | ||
[source,properties,subs='verbatim,attributes'] | ||
``` | ||
# guarantees all events are logged before the function execution is finished | ||
async=false | ||
|
||
# you should consider adding your packages here to enable filtering of stack traces in Sentry | ||
|
||
# stacktrace.app.packages=agorapulse,com.agorapulse | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters