public class Log extends Object
Modifier and Type | Field and Description |
---|---|
(package private) StringBuilder |
buffer |
private static Log |
instance |
(package private) LogLevel |
logLevel |
private Map<LogType,Boolean> |
logTypesPermits |
(package private) PrintStream |
out |
private String |
pattern |
(package private) PrintStream |
syserr |
(package private) PrintStream |
sysout |
Modifier | Constructor and Description |
---|---|
private |
Log() |
Modifier and Type | Method and Description |
---|---|
private static void |
appendToBuffer(LogType type,
String message) |
static void |
debug(LogType type,
String message) |
static void |
debug(LogType type,
String format,
Object... args) |
static void |
error(LogType type,
String message) |
static void |
error(LogType type,
String format,
Object... args) |
private void |
flushBufferAtExit() |
static boolean |
isLoggable(LogType type) |
static void |
log(LogType type,
String message) |
static void |
log(LogType type,
String format,
Object... args) |
static void |
setLoggable(LogType type,
boolean shouldBeLogged) |
static void |
setLogLevel(LogLevel level) |
static void |
setOutput(PrintStream output) |
static void |
setOutput(String where) |
static void |
setPattern(String pattern) |
String |
toString() |
StringBuilder buffer
private static final Log instance
PrintStream out
PrintStream sysout
PrintStream syserr
private String pattern
LogLevel logLevel
private void flushBufferAtExit()
public static void setLoggable(LogType type, boolean shouldBeLogged)
public static boolean isLoggable(LogType type)
public static void setOutput(String where) throws FileNotFoundException
FileNotFoundException
public static void setOutput(PrintStream output)
public static void setPattern(String pattern)
public static void setLogLevel(LogLevel level)