Package com.iizigo
Class Console
- java.lang.Object
- com.iizigo.Console
- All Implemented Interfaces:
ILoggerRedirector
public class Console extends java.lang.Object implements ILoggerRedirector
Console class with colors.- Author:
- Christopher Mindus
Field Summary
Fields Modifier and Type Field Description static java.awt.Color[]
CONSOLE_defaultColors
The default color array.static int
TYPE_log_CONFIG
static int
TYPE_log_FINE
static int
TYPE_log_FINER
static int
TYPE_log_FINEST
static int
TYPE_log_INFO
static int
TYPE_log_SEVERE
static int
TYPE_log_WARNING
static int
TYPE_stderr
The types.static int
TYPE_stdout
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
eprintln(java.lang.String msg)
Prints a stderr message.static IPrintAdapter
getPrintAdapter()
Gets the printer to use for simple console output.void
onEventLogged(LogEntry entry)
Called when an event is logged.static void
println(int type, java.lang.String msg)
Prints to any of the stream types.static void
println(java.lang.String msg)
Prints a stdout message.
Field Detail
TYPE_stderr
public static final int TYPE_stderr
The types.- See Also:
- Constant Field Values
TYPE_stdout
public static final int TYPE_stdout
- See Also:
- Constant Field Values
TYPE_log_SEVERE
public static final int TYPE_log_SEVERE
- See Also:
- Constant Field Values
TYPE_log_WARNING
public static final int TYPE_log_WARNING
- See Also:
- Constant Field Values
TYPE_log_INFO
public static final int TYPE_log_INFO
- See Also:
- Constant Field Values
TYPE_log_CONFIG
public static final int TYPE_log_CONFIG
- See Also:
- Constant Field Values
TYPE_log_FINE
public static final int TYPE_log_FINE
- See Also:
- Constant Field Values
TYPE_log_FINER
public static final int TYPE_log_FINER
- See Also:
- Constant Field Values
TYPE_log_FINEST
public static final int TYPE_log_FINEST
- See Also:
- Constant Field Values
CONSOLE_defaultColors
public static final java.awt.Color[] CONSOLE_defaultColors
The default color array.
Method Detail
getPrintAdapter
public static IPrintAdapter getPrintAdapter()
Gets the printer to use for simple console output.- Returns:
- The instance.
onEventLogged
public void onEventLogged(LogEntry entry)
Called when an event is logged.- Specified by:
onEventLogged
in interfaceILoggerRedirector
- Parameters:
entry
- The log entry.
eprintln
public static void eprintln(java.lang.String msg)
Prints a stderr message.- Parameters:
msg
- The message to print.
println
public static void println(java.lang.String msg)
Prints a stdout message.- Parameters:
msg
- The message to print.
println
public static void println(int type, java.lang.String msg)
Prints to any of the stream types.- Parameters:
type
- The type of message:TYPE_stderr = 0 TYPE_stdout = 1 TYPE_log_SEVERE = 2 TYPE_log_WARNING = 3 TYPE_log_INFO = 4 TYPE_log_CONFIG = 5 TYPE_log_FINE = 6 TYPE_log_FINER = 7 TYPE_log_FINEST = 8
msg
- The message to print.