Class TTConsoleLogger
java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.log.TTConsoleLogger
A helper class that offers various types of logging.
Provides plain logging into console log and annotated logging with
TTConsoleAnnotator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the logger.voidLogs plain text messages directly into console.voidLogs annotated message.voidLogs annotated message.voidlogComException(Exception exception) Logs error message caused by COM exception and prints stacktrace for debugging purposes.voidlogComException(String message, Exception exception) Logs custom error message with caused COM exception and prints stacktrace for debugging purposes.voidLogs debug message.voidLogs error message.voidLogs info message.voidlogStackTrace(Exception exception) Logs an exception stacktrace as debug message.voidLogs warning message.
-
Constructor Details
-
TTConsoleLogger
Instantiates a newTTConsoleLogger.- Parameters:
listener- the listener
-
-
Method Details
-
getLogger
Gets the logger.- Returns:
- the
PrintStreamlogger
-
logAnnot
Logs annotated message.- Parameters:
message- the message to log
-
logAnnot
Logs annotated message.- Parameters:
prefix- the prefixmessage- message to be annotated
-
logInfo
Logs info message.- Parameters:
message- the message to log
-
logWarn
Logs warning message.- Parameters:
message- the message to log
-
logError
Logs error message.- Parameters:
message- the message to log
-
logComException
Logs error message caused by COM exception and prints stacktrace for debugging purposes.- Parameters:
exception- the exception
-
logComException
Logs custom error message with caused COM exception and prints stacktrace for debugging purposes.- Parameters:
exception- the exceptionmessage- the error message
-
logDebug
Logs debug message. Can be enabled either by providing -Decutest.debugLog=true to Jenkins master JVM or setting system property ecutest.debugLog directly.- Parameters:
message- the message to log
-
logStackTrace
Logs an exception stacktrace as debug message.- Parameters:
exception- the exception
-
log
Logs plain text messages directly into console.- Parameters:
message- message in plain text
-