Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBkiNN committed Jun 3, 2024
2 parents ef7a2fe + 2714bd6 commit 0217a4b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This is utility library that provides new log4j2 configuration utilities
## [LoggerNameRewritePolicy](src/main/java/xyz/bobkinn/log4jutils/LoggerNameRewritePolicy.java)
Rewrites logger name
```xml
<Rewrite name="rewrite">
<LoggerNameRewritePolicy>
<KeyValuePair key="com.sedmelluq.lava." value="LavaPlayer"/>
</LoggerNameRewritePolicy>
<AppenderRef ref="rewrite1"/>
</Rewrite>
```
This config above replaces logger names that starts with `com.sedmelluq.lava.` with `LavaPlayer`.\
One pair can specify multiple keys by separating them with `,` like `key="com.sedmelluq.lava.,MyAudioLoader"`.\
If key ends with `.` symbol, then this replacement will be used if original logger name starts with this key, or if not then original logger name must match key

0 comments on commit 0217a4b

Please sign in to comment.