Skip to content

BoBkiNN/log4j-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages