Skip to content
Advertisement

Log4j ThreadContext.clear() not available with auto-complete?

according to the Log4j documentation I can call

ThreadContext.clear();

but in my IDE I do not get clear() as an available method and I also get compilation errors, I only see clearAll(), etc., why? What is missing on the classpath?

Log4j Version 2.16.0 is used.

enter image description here

Advertisement

Answer

As per https://svn.apache.org/viewvc?view=revision&revision=1594389, the clear() method is replaced with clearMap() (it was already deprecated when it was removed).

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement