Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed link to log4j2.xml

...

  1. Choose an approach for migration.
    • Start with the new log4j2.xml that Magnolia provides and customize it to your needs.
    • Or take you current configuration file and follow the official guide.
  2. Update your magnolia.properties (log4j.config) to point to the new file.

    Tip

    We recommend the new file be called log4j2.xml to avoid confusion.

  3. Do a basic library check:

    • Make sure you don't have log4j-1.2.17.jar or similar in WEB-INF/lib anymore.
    • There should be only:
      • log4j-api
      • log4j-core
      • log4j-slf4j-impl (the slf4j implementation is now provided by Log4j 2)

        Warning

        Make sure you don't have slf4j-log4j12-1.7.7.jar. Having both installed leads to unpredictable behavior.

  4. If in doubt about your config, you may set the level of Log4j's status-logger to debug as follows:

    Code Block
    languagexml
    <Configuration status="DEBUG">
      ...

...