Log4j 2 – The Ghost in the logging framework
During testing, a team faced consistent test failures with trace logging enabled when testing HTTP requests. Investigation revealed that Log4j2's recursive variable substitution feature caused significant slowdown, and disabling the feature enabled faster test runs and log generation. SOAP-based web services were found to be particularly affected due to large XML documents in response messages. Recursive lookups enabled by default can cause performance issues and may require disabling. Additionally, log forgery and injection can occur, so caution must be taken to ensure log files are properly consumed.