com.prolixtech.utils
Class JavaLogger
java.lang.Object
com.prolixtech.utils.JavaLogger
- MboxLogger
public class JavaLogger
extends java.lang.Object
This class provides a single logging utility used for debugging purposes. It
delegates most of its work to the java logging system, however it is made a
singleton here so that it can be used throughout the application.
static MboxLogger | Instance() - Pertains to the Singleton DESIGN PATTERN.
|
void | baloon(String msg, String title)
|
void | disableBaloons()
|
void | exception(Level x, String msg, Exception e)
|
void | exception(String msg, Exception e)
|
void | fine(String msg) - Shortcut to submit a log message at the level FINE
|
Logger | getLogger() - For manual submission directly to the logger
|
void | http(Request req, String msg) - Specialized submit for HTTP messages
|
void | info(String msg) - Shortcut to submit a log message at the level INFO
|
void | log(Level vel, String msg) - The main logging function is set by default to output to the console.
|
void | severe(String msg) - Shortcut to submit a log message at the level SEVERE
|
void | sql(String msg) - Specialized submit for SQL messages
|
void | warning(String msg) - Shortcut to submit a log message at the level WARNING
|
JavaLogger
protected JavaLogger()
Instance
public static MboxLogger Instance()
Pertains to the Singleton DESIGN PATTERN.
baloon
public void baloon(String msg,
String title)
- baloon in interface MboxLogger
exception
public void exception(Level x,
String msg,
Exception e)
- exception in interface MboxLogger
fine
public void fine(String msg)
Shortcut to submit a log message at the level FINE
- fine in interface MboxLogger
msg
- the message to submit
getLogger
public Logger getLogger()
For manual submission directly to the logger
- the logger of this singleton
http
public void http(Request req,
String msg)
Specialized submit for HTTP messages
- http in interface MboxLogger
msg
- the message to submit
info
public void info(String msg)
Shortcut to submit a log message at the level INFO
- info in interface MboxLogger
msg
- the message to submit
log
public void log(Level vel,
String msg)
The main logging function is set by default to output to the console. If
we require better logging in the future, perhaps a number of streams will
be made. The default operation prints the last function called (gets it
through a stacktrace) the message, the time.
- log in interface MboxLogger
vel
- the level of the message to log.msg
- the message to log.
severe
public void severe(String msg)
Shortcut to submit a log message at the level SEVERE
- severe in interface MboxLogger
msg
- the message to submit
sql
public void sql(String msg)
Specialized submit for SQL messages
- sql in interface MboxLogger
msg
- the message to submit
warning
public void warning(String msg)
Shortcut to submit a log message at the level WARNING
- warning in interface MboxLogger
msg
- the message to submit