Skip to content

Commit

Permalink
last try
Browse files Browse the repository at this point in the history
  • Loading branch information
hulkoba committed Nov 7, 2024
1 parent 39a1494 commit 7609f81
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public void beforeEach(@Named("List") final ListAppender listAppender, final Log
@Test
public void testEvent(final LoggerContext context) {
final org.apache.logging.log4j.Logger logger = context.getLogger("org.apache.test.LogEventFactory");
// Explicitly add ListAppender to the logger
logger.addAppender(app);
logger.error("error message");
final List<LogEvent> events = app.getEvents();
assertNotNull(events, "No events");
Expand Down

0 comments on commit 7609f81

Please sign in to comment.