public class EZLoggerManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EZLoggerManager.LogLevel |
Constructor and Description |
---|
EZLoggerManager() |
Modifier and Type | Method and Description |
---|---|
static void |
enableConsoleLogger(boolean enable)
Figures out whether or not the default Java Logging Console logger has to be enabled.
|
static void |
enableFileLogger(String fileName,
boolean append)
Figures out whether or not a file logger has to be enabled.
|
static void |
enableUILogger(boolean enable,
int sizeLimit)
Figures out whether or not the UI logger has to be enabled.
|
static EZLoggerManager.LogLevel |
getLevel()
Returns the current log level.
|
static JComponent |
getUILogger()
Returns the UI Logger component.
|
static void |
initialize()
Call this method to setup the logging framework.
|
protected static boolean |
isInitialized()
For internal use only.
|
static void |
setConsoleLoggerFormatter(Formatter formatter)
Sets the console logger formatter.
|
static void |
setFileLoggerFormatter(Formatter formatter)
Sets the file logger formatter.
|
static void |
setLevel(EZLoggerManager.LogLevel lvl)
Set the log level.
|
static void |
setUILoggerFormatter(Formatter formatter)
Sets the UI logger formatter.
|
protected static void |
updateLevel(EZLoggerManager.LogLevel lvl)
For internal use only.
|
public static void setLevel(EZLoggerManager.LogLevel lvl)
lvl
- the log level.protected static void updateLevel(EZLoggerManager.LogLevel lvl)
public static EZLoggerManager.LogLevel getLevel()
public static void enableConsoleLogger(boolean enable)
enable
- use true to enable console logger, false otherwise.public static void enableUILogger(boolean enable, int sizeLimit)
enable
- use true to enable UI logger, false otherwise.public static void enableFileLogger(String fileName, boolean append) throws IOException
fileName
- the file name to use. Parameter can be a simple file name, or a full path
to a file.append
- use true to append log content to the file over application sessions.IOException
- if file cannot be created.public static void setConsoleLoggerFormatter(Formatter formatter)
public static void setUILoggerFormatter(Formatter formatter)
public static void setFileLoggerFormatter(Formatter formatter)
public static void initialize()
protected static boolean isInitialized()
public static JComponent getUILogger()
Plealog Software - 2003-2017