Interface FixtureLogger
-
- All Known Subinterfaces:
AggregatingFixtureLogger
- All Known Implementing Classes:
DefaultFixtureLogger
public interface FixtureLogger
The fixture logger should be used by fixture classes and methods in order to log stuff that does NOT originate from within the application under test itself, but from within the fixture logic.Fixture log output is collected separately from the applications' log output (from the console), which allows to get both log streams displayed in a separated fashion in the test result.
- Author:
- Rene Schneider - initial API and implementation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
debug(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.DEBUG
level.void
error(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.ERROR
level.void
info(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.INFO
level.void
log(FixtureLogLevel aLevel, java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message at the specified log level.void
trace(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.TRACE
level.void
warn(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.WARNING
level.
-
-
-
Method Detail
-
log
void log(FixtureLogLevel aLevel, java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message at the specified log level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aLevel
- the log levelaMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
error
void error(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.ERROR
level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
warn
void warn(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.WARNING
level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
info
void info(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.INFO
level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
debug
void debug(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.DEBUG
level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
trace
void trace(java.lang.String aMessage, java.lang.Object... someParameters)
Log the specified message atFixtureLogLevel.TRACE
level. The message may contain placeholders "{}" which will be replaced by the respective parameter provided (order of parameters is mapped onto order of placeholders). Non-String parameters are converted toString
s by calling toString().An exception is the last parameter: if it is a
Throwable
, it is not considered to be a "normal" parameter for a placeholder. Instead, the stacktrace of theThrowable
is logged as part of the log message.- Parameters:
aMessage
- the message to log (possibly with placeholders)someParameters
- parameters to insert into placeholders, optionally aThrowable
at the end of the list
-
-