Last active
July 30, 2018 23:49
-
-
Save wkorando/5f9d015c54f445a3d1aa026a97a89b99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StaticAppender extends AppenderBase<ILoggingEvent> { | |
static List<ILoggingEvent> events = new ArrayList<>(); | |
@Override | |
public void append(ILoggingEvent e) { | |
events.add(e); | |
} | |
public static List<ILoggingEvent> getEvents() { | |
return events; | |
} | |
public static void clearEvents() { | |
events.clear(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment