public class LoggerAuditingExtension extends Object implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Implementation note: Make sure to not expose log4j dependencies in the interface of this class to ease updates in logging infrastructure.
| Constructor and Description |
|---|
LoggerAuditingExtension(Class<?> clazz,
org.slf4j.event.Level level) |
LoggerAuditingExtension(String loggerName,
org.slf4j.event.Level level) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) |
List<org.apache.logging.log4j.core.LogEvent> |
getEvents() |
String |
getLoggerName() |
List<String> |
getMessages() |
public LoggerAuditingExtension(Class<?> clazz, org.slf4j.event.Level level)
public LoggerAuditingExtension(String loggerName, org.slf4j.event.Level level)
public List<org.apache.logging.log4j.core.LogEvent> getEvents()
public String getLoggerName()
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
throws Exception
beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallbackExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.