Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4j 1.2: %replace{pattern}{regex}{substitution} and %enc{pattern} not working

Tags:

logging

log4j

Is %replace and %enc supported in log4j 1.2.x?. Relevant configurations were found in log4j 2.x documentation [1] but not for older versions.

[1] https://logging.apache.org/log4j/2.x/manual/layouts.html

like image 823
Charini Nanayakkara Avatar asked Dec 19 '25 14:12

Charini Nanayakkara


1 Answers

No.
Features found in log4j 2 may not be found in log4j 1. According to their site:

The API for Log4j 2 is not compatible with Log4j 1.x, however an adapter is available to allow applications to continue to use the Log4j 1.x API.

http://logging.apache.org/log4j/2.x/

like image 69
sazzad Avatar answered Dec 23 '25 14:12

sazzad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!