Package com.tonic.util
Class Logger
- java.lang.Object
-
- com.tonic.util.Logger
-
public class Logger extends Object
Console logger for informational and error messages, silent unless logging is switched on.
-
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiderror(String message)Logs an error message to standard error.static voidinfo(String message)Logs an informational message to standard output.static voidsetLog(boolean log)Switches logging on or off process-wide; when off, info and error calls print nothing.
-
-
-
Method Detail
-
setLog
public static void setLog(boolean log)
Switches logging on or off process-wide; when off, info and error calls print nothing.- Parameters:
log- true to emit messages
-
info
public static void info(String message)
Logs an informational message to standard output.- Parameters:
message- the message to log
-
error
public static void error(String message)
Logs an error message to standard error.- Parameters:
message- the error message to log
-
-