public class CapturingLogHandler extends Handler
This allows checking the contents of the log messages in unit tests.
| Constructor | Description |
|---|---|
CapturingLogHandler() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
void |
flush() |
|
String |
getCapturedData() |
Get the captured data from the messages
|
void |
publish(LogRecord record) |
|
void |
reset() |
Reset the capture buffer
|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic String getCapturedData()
public void reset()
Copyright © 2019. All rights reserved.