Lazy way to convert log4j.xml to log4j2.xml

Is there a simple / lazy way (e.g. shell script, etc.) to convert a large log4j.xml file to log4j2.xml equivalent ?

Or does everyone do it manually?

+6
source share
2 answers

There is currently no tool for automatically converting log4j-1.x configurations to log4j2 configurations.

Log4j2 configuration is simpler, but much better documented. The Log4j2 manual contains many examples for lookups , appenders , layouts, and filters .

+2
source

I started writing a script to port simple usage examples from log4j.properties to log4j2.xml. It is currently at a very early stage, but can convert some simple configurations. It can be extended to similar log4j.xml configurations.

https://github.com/mulesoft-labs/log4j2-migrator

+2
source

Source: https://habr.com/ru/post/977668/


All Articles