Interface FixtureLogger
-
- All Known Subinterfaces:
AggregatingFixtureLogger
- All Known Implementing Classes:
DefaultFixtureLogger
public interface FixtureLoggerThe 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 voiddebug(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.DEBUGlevel.voiderror(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.ERRORlevel.voidinfo(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.INFOlevel.voidlog(FixtureLogLevel aLevel, java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message at the specified log level.voidtrace(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.TRACElevel.voidwarn(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.WARNINGlevel.
-
-
-
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 toStrings 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 theThrowableis 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 aThrowableat the end of the list
-
error
void error(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.ERRORlevel. 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 toStrings 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 theThrowableis logged as part of the log message.- Parameters:
aMessage- the message to log (possibly with placeholders)someParameters- parameters to insert into placeholders, optionally aThrowableat the end of the list
-
warn
void warn(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.WARNINGlevel. 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 toStrings 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 theThrowableis logged as part of the log message.- Parameters:
aMessage- the message to log (possibly with placeholders)someParameters- parameters to insert into placeholders, optionally aThrowableat the end of the list
-
info
void info(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.INFOlevel. 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 toStrings 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 theThrowableis logged as part of the log message.- Parameters:
aMessage- the message to log (possibly with placeholders)someParameters- parameters to insert into placeholders, optionally aThrowableat the end of the list
-
debug
void debug(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.DEBUGlevel. 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 toStrings 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 theThrowableis logged as part of the log message.- Parameters:
aMessage- the message to log (possibly with placeholders)someParameters- parameters to insert into placeholders, optionally aThrowableat the end of the list
-
trace
void trace(java.lang.String aMessage, java.lang.Object... someParameters)Log the specified message atFixtureLogLevel.TRACElevel. 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 toStrings 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 theThrowableis logged as part of the log message.- Parameters:
aMessage- the message to log (possibly with placeholders)someParameters- parameters to insert into placeholders, optionally aThrowableat the end of the list
-
-