'AppenderSkeleton (Log4j2)

I am trying to migrate a class that extends org.apache.log4j.AppenderSkeleton from an old version of log4j to log4j 2. I was reading the JavaDoc for the class, and I read that,

Appenders constructed using this are ignored in Log4j 2.

on the website for the class.

Does this mean, if I am using Log4j 2, I should extend this class? If yes, what should I use as an alternative? Would ConsoleAppender do the trick?



Solution 1:[1]

The code supporting the accepted answer here is available in the answer by David Lopez Carrasco to another question. This code should be supplemented with clearing the logs List in-between tests and test suites (otherwise the appender would hold messages from previous loggers).

I'd add it as a comment, but I don't have enough reputation to comment.

Solution 2:[2]

To obtain a SemVer version you can use something like this:

python --version | sed 's,Python ,,'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 J_H