saros icon indicating copy to clipboard operation
saros copied to clipboard

Complete Log4j2 migration

Open m273d15 opened this issue 5 years ago • 1 comments

With #270/#1064 we migrated the Log4j backend to Log4j2. Only the framework set-up and initialization had to be migrated in this step. However, we still use the old API (of log4j) instead of the log4j2 API. Migrating the API leads to changes in a myriad of files. Therefore, we should automate as much as possible.

You can find further information in the logging docs.

m273d15 avatar Sep 11 '20 09:09 m273d15

I wrote a small migration script (Disclaimer: This script uses heuristics and the output should be validated). It should migrate all relevant calls, but manual changes are required if:

  • A function call is migrated to a closure, but an object is not accessible in the closure context.
  • A method is still wrapped in an ifTraceEnabled if-block.

I would recommend avoiding a big bang migration and use the script to migrate packages or components (e.g. core) step-by-step.

m273d15 avatar Sep 16 '20 09:09 m273d15