Uses of Class
org.jvnet.hudson.test.LoggerRule
-
Uses of LoggerRule in org.jvnet.hudson.test
Modifier and TypeMethodDescriptionLoggerRule.capture
(int maximum) Initializes log record capture, in addition to merely printing it.LoggerRule.quiet()
Don't emit logs to the console, only record.Same asrecord(String, Level)
but callsClass.getName()
for you first.Same asrecord(Logger, Level)
but callsLogger.getLogger(String)
for you first.Start listening to a logger.LoggerRule.recordPackage
(Class<?> clazz, Level level) Same asrecord(String, Level)
but callsClass.getPackage()
and getName() for you first.Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<LoggerRule>
Creates aMatcher
that matches if theLoggerRule
has aLogRecord
at the specifiedLevel
and with a message matching the specified matcher.static org.hamcrest.Matcher<LoggerRule>
LoggerRule.recorded
(Level level, org.hamcrest.Matcher<String> message, org.hamcrest.Matcher<Throwable> thrown) Creates aMatcher
that matches if theLoggerRule
has aLogRecord
at the specifiedLevel
, with a message matching the specified matcher, and with aThrowable
matching the specified matcher.static org.hamcrest.Matcher<LoggerRule>
Creates aMatcher
that matches if theLoggerRule
has aLogRecord
with a message matching the specified matcher.static org.hamcrest.Matcher<LoggerRule>
Creates aMatcher
that matches if theLoggerRule
has aLogRecord
with a message matching the specified matcher and with aThrowable
matching the specified matcher.Modifier and TypeMethodDescriptionvoid
JenkinsRule.showAgentLogs
(hudson.model.Slave s, LoggerRule loggerRule) Same asJenkinsRule.showAgentLogs(Slave, Map)
but taking a preconfigured list of loggers as a convenience.