public class Log4jEventCollectorWrapper extends Object implements AutoCloseable
A specific need for this wrapper is to mediate usage of some Log4J classes (like Appender) which are not considered a part of the pax logging API whenever we still need to use them in modules, in order to avoid class loading issues.
| Modifier and Type | Class and Description |
|---|---|
static class |
Log4jEventCollectorWrapper.LoggingEventWrapper
Wraps the Log4J LoggingEvent.
|
| Constructor and Description |
|---|
Log4jEventCollectorWrapper(int level)
Create a wrapper and start collecting events.
|
Log4jEventCollectorWrapper(int minLevel,
int maxLevel)
Create a wrapper and start collecting events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<Log4jEventCollectorWrapper.LoggingEventWrapper> |
getCollectedEvents() |
public Log4jEventCollectorWrapper(int level)
level - Logging level of events to collectpublic Log4jEventCollectorWrapper(int minLevel,
int maxLevel)
minLevel - Minimum logging level of events to collectmaxLevel - Maximum logging level of events to collectpublic void close()
close in interface AutoCloseablepublic List<Log4jEventCollectorWrapper.LoggingEventWrapper> getCollectedEvents()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.