helpers.LogLog class in log4j-1.2-api-2.17.1.jar

411 Views Asked by At

I am using log4j-1.2-api-2.17.1.jar to fix lo4j vulnerability but "helpers. Loglog" class not found in log4j-1.2-api-2.17.1.jar ?

1

There are 1 best solutions below

0
Borea Deitz On

Log4j's migration guidance is spotty, but it does appear true that the 'LogLog' class was removed in the transition from v1 to v2. The only reference I can find to what replaces it in v2 is from the Narkive mailing list archive, where a user identified as 'Remko Popma' suggests that the replacement is 'StatusLogger'.

Unforunately, 'StatusLogger' may not be a drop-in replacement for 'LogLog'. 'LogLog' had methods debug(String msg), error(String msg) and warn(String msg) that take simple String arguments and log them. 'StatusLogger' has methods with the same name and signature, which suggests that these might be drop-in replacements. That is,

LogLog.debug("Something happened here")

might become

StatusLogger.debug("Something happened here")

with no further changes needed. Or, it might require some config changes. Or, it might not work at all.

Without further guidance from the Log4j group, figuring out how to move from 'LogLog' to 'StatusLogger' will take a little experimentation. I'll post an edit once I've been able to try it out.