Package org.ek9lang.core
Class Logger
java.lang.Object
org.ek9lang.core.Logger
Wrapper for logging.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Conditionally output debug information to stderr.static void
Conditionally output debug information to stderr, using printf format.static void
enableDebug
(boolean enabled) enable of disable debug output.static void
Log an error unless muting is enabled.static void
Log a throwable stack trace unless muting is enabled.static void
Logs output to stdout.static void
setMuteStderrOutput
(boolean muteStderrOutput) Mute stderr output, but default the Logger uses stderr to report errors.
-
Method Details
-
enableDebug
public static void enableDebug(boolean enabled) enable of disable debug output.- Parameters:
enabled
- by default Logger disabled debug output.
-
setMuteStderrOutput
public static void setMuteStderrOutput(boolean muteStderrOutput) Mute stderr output, but default the Logger uses stderr to report errors.- Parameters:
muteStderrOutput
- by default Logger does not mute stderr, (for tests it is handy to switch off).
-
debug
Conditionally output debug information to stderr. -
log
Logs output to stdout. -
debugf
Conditionally output debug information to stderr, using printf format. -
error
Log an error unless muting is enabled.- Parameters:
content
- The content to log to stderr.
-
error
Log a throwable stack trace unless muting is enabled.- Parameters:
throwable
- The throwable and its stack to log to stderr.
-