AllLogRule instead since we want tests to not output anything
to the console@Deprecated public class LogRule extends Object implements org.junit.rules.TestRule
@Rule public LogRule logRule = new LogRule() {{
record(LogLevel.WARN);
recordLoggingForType(RestrictParseLocationEventHandler.class);
}};
| Modifier and Type | Class and Description |
|---|---|
static class |
LogRule.LogLevel
Deprecated.
Helper class to represent Logging levels to capture.
|
class |
LogRule.LogStatement
Deprecated.
The actual code that executes our capturing logic before the test runs and removes it after it has run.
|
| Constructor and Description |
|---|
LogRule()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement statement,
org.junit.runner.Description description)
Deprecated.
|
boolean |
contains(String logOutput)
Deprecated.
|
org.slf4j.Marker |
getMarker(int position)
Deprecated.
|
String |
getMessage(int position)
Deprecated.
|
void |
record(LogRule.LogLevel level)
Deprecated.
|
void |
recordLoggingForType(Class<?> type)
Deprecated.
|
int |
size()
Deprecated.
|
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRulepublic void record(LogRule.LogLevel level)
level - the log level to capturepublic void recordLoggingForType(Class<?> type)
type - the logging class type for which to capture logspublic boolean contains(String logOutput)
logOutput - the log output to match in the captured datapublic String getMessage(int position)
position - the message number in the list of captured logspublic org.slf4j.Marker getMarker(int position)
position - the message number in the list of captured logspublic int size()
Copyright © 2004–2015 XWiki. All rights reserved.