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.void
Logs plain text messages directly into console.void
Logs annotated message.void
Logs annotated message.void
logComException
(Exception exception) Logs error message caused by COM exception and prints stacktrace for debugging purposes.void
logComException
(String message, Exception exception) Logs custom error message with caused COM exception and prints stacktrace for debugging purposes.void
Logs debug message.void
Logs error message.void
Logs info message.void
logStackTrace
(Exception exception) Logs an exception stacktrace as debug message.void
Logs warning message.
-
Constructor Details
-
TTConsoleLogger
Instantiates a newTTConsoleLogger
.- Parameters:
listener
- the listener
-
-
Method Details
-
getLogger
Gets the logger.- Returns:
- the
PrintStream
logger
-
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
-