public interface ILogger
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG_LEVEL |
static int |
DEFAULT_LEVEL |
static int |
ERROR_LEVEL |
static int |
INFO_LEVEL |
static int |
WARRNING_LEVEL |
Modifier and Type | Method and Description |
---|---|
void |
addLoggerChangedListener(ILoggerChangedListener listener)
Add one more LoggerChangedListener to the HashSet with all
LoggerChangedListeners.
|
void |
debug(String msg)
This method logs a debug message into the logger.
|
void |
debug(String msg,
boolean condition)
This method logs a debug message into the logger if the given condition
is true.
|
void |
error(String msg)
This method logs an error into the logger.
|
void |
error(String msg,
boolean condition)
This method logs an error into the logger if the given condition is true.
|
Vector |
getLogs() |
void |
info(String msg)
This method logs an information into the logger.
|
void |
info(String msg,
boolean condition)
This method logs an information into the logger if the given condition is
true.
|
void |
log(int level,
String msg)
This method will store all messages with level and date as a LogObject.
|
void |
log(String msg)
This method logs a default message into the logger.
|
void |
log(String msg,
boolean condition)
This method logs a default message into the logger if the given condition
is true.
|
void |
removeLoggerChangedListener(ILoggerChangedListener listener)
Remove a LoggerChangedListener from the HashSet with all
LoggerChangedListeners.
|
void |
setFile(File file)
Set a file for your logger.
|
void |
setLogLevel(int level)
Sets the log level for the logger.
|
void |
warning(String msg)
This method logs a warning into the logger.
|
void |
warning(String msg,
boolean condition)
This method logs a warning into the logger if the given condition is
true.
|
static final int DEBUG_LEVEL
static final int DEFAULT_LEVEL
static final int INFO_LEVEL
static final int WARRNING_LEVEL
static final int ERROR_LEVEL
void log(int level, String msg)
level
- the level of the messagemsg
- the message, that will be storedvoid log(String msg)
msg
- the messagevoid log(String msg, boolean condition)
msg
- the messagecondition
- a conditionvoid debug(String msg)
msg
- the message of the debug infovoid debug(String msg, boolean condition)
msg
- the message of the debug infocondition
- a conditionvoid warning(String msg)
msg
- the message of the warningvoid warning(String msg, boolean condition)
msg
- the message of the warningcondition
- a conditionvoid info(String msg)
msg
- the message of the informationvoid info(String msg, boolean condition)
msg
- the message of the informationcondition
- a conditionvoid error(String msg)
msg
- the message of the errorvoid error(String msg, boolean condition)
msg
- the message of the errorcondition
- a conditionvoid setFile(File file)
file
- the file to be opened for writingvoid addLoggerChangedListener(ILoggerChangedListener listener)
listener
- the listener, that should be addedvoid removeLoggerChangedListener(ILoggerChangedListener listener)
listener
- the listener, that should be removedvoid setLogLevel(int level)
level
- a new log level. See _LEVEL fields for possible valuesVector getLogs()