How to use LoggingEvent class with log4j 2.2

后端 未结 2 668
春和景丽
春和景丽 2021-01-18 00:36

I want to migrate from Log4j 1.x to Log4j 2.x. So I\'m trying to use log4j-1.2-api.jar as mentioned here. My application has an implementation of org.apa

2条回答
  •  北海茫月
    2021-01-18 01:20

    When upgrading Log4j, I simply used LogEvent instead of LoggingEvent.

    I had removed AppenderSkeleton and replaced it with AbstractAppender. AppenderSkeleton's append(LoggingEvent event) method appears in AbstractAppender as append(LogEvent event), which was my cue to use LogEvent instead of LoggingEvent.

提交回复
热议问题