Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 1.21 KB

README.md

File metadata and controls

38 lines (35 loc) · 1.21 KB
JitPack release

This is utility library that provides new log4j2 configuration utilities

Usage (Maven):

  1. Add JitPack repository:
<repository>
 <id>jitpack.io</id>
 <url>https://jitpack.io</url>
</repository>
  1. Add dependency:
<dependency>
  <groupId>com.github.BoBkiNN</groupId>
  <artifactId>log4j-utils</artifactId>
  <version>1.0.0</version>
</dependency>

Rewrites logger name

<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.