|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for Logging used by OrindaSoft software. Can be implemented by customers so that OrindaSoft software can be fully integrated with the customer's application. This interface supports 5 types of messages
debug - Can be turned off
info - Generated during the course of normal operations
warning - Something strange has happened
error - Something bad has happened but the application is still working
systemError - Something that's really bad and is never supposed to happen has happened. The application will usually stop after one of these.
Each message has two methods to call it - a simple method which has the message text as the sole parameter and a more detailed method which allows the developer to specify
isModal - whether a modal window should come up
isLogged - whether the message should be logged to a file or other persistant storage mechanism.
Although present in the interface the above two features do not have to work in all implementations.
There are also a couple of housekeeping Methods that need to implemented
flush() - Flushes any log files being written to.
getCurrentLogFile() - Returns name of current log file.
See LogInterface
(c) 2003-2011 Orinda Software Ltd
| Field Summary | |
static java.lang.String |
DEBUG
Constant used when formatting message strings |
static java.lang.String |
DEFAULT_FIELD_DELIMITER
Constant for the field delimiter used in log messages |
static java.lang.String |
DEFAULT_FILENAME_DAY_FORMAT
Default format for day component of log file names. |
static java.lang.String |
DEFAULT_FILENAME_TIME_FORMAT
Default format for time component of log file names. |
static java.lang.String |
DEFAULT_TIME_FORMAT_STRING
Constant for the time format used in log messages |
static java.lang.String |
ERROR
Constant used when formatting message strings |
static java.lang.String |
INFO
Constant used when formatting message strings |
static java.lang.String |
SYSERR
Constant used when formatting message strings |
static java.lang.String |
WARN
Constant used when formatting message strings |
| Method Summary | |
void |
debug(java.lang.String theMessage)
Log a debug message. |
void |
debug(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
Log a debug message. |
void |
debugOff()
Turn debug messages off |
void |
debugOn()
Turn debug messages on |
void |
error(java.lang.Exception theException)
Log an Exception. |
void |
error(java.lang.Exception theException,
boolean isModal,
boolean isLogged)
Log an error message. |
void |
error(java.lang.String theMessage)
Log an error message. |
void |
error(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
Log an error message. |
void |
flush()
If the log is buffered then flush any outstanding changes. |
java.lang.String |
getCurrentLog()
Returns a string with the name of the current log. |
java.lang.String |
getDateFormat()
Returns the current Date Format |
boolean |
getDebug()
Get debug status |
void |
info(java.lang.String theMessage)
Log an informational message. |
void |
info(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
Log an informational message. |
void |
setAutoFlush(boolean flushEveryMessage)
Controls whether the class should flush the log every time it is asked to print a message. |
void |
setAutoLog(boolean logEveryMessageByDefault)
Controls whether the class should log every message unless told not to. |
void |
syserror(java.lang.Exception theException)
Log a serious Exception. |
void |
syserror(java.lang.Exception theException,
boolean isModal,
boolean isLogged)
Log a serious Exception. |
void |
syserror(java.lang.String theMessage)
Log a serious error message. |
void |
syserror(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
Log a serious error message. |
void |
warning(java.lang.String theMessage)
Log a warning message. |
void |
warning(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
Log a warning message. |
| Field Detail |
public static final java.lang.String DEBUG
public static final java.lang.String INFO
public static final java.lang.String WARN
public static final java.lang.String ERROR
public static final java.lang.String SYSERR
public static final java.lang.String DEFAULT_TIME_FORMAT_STRING
public static final java.lang.String DEFAULT_FILENAME_DAY_FORMAT
public static final java.lang.String DEFAULT_FILENAME_TIME_FORMAT
public static final java.lang.String DEFAULT_FIELD_DELIMITER
| Method Detail |
public void debugOn()
public void debugOff()
public boolean getDebug()
true if debug messages are being printed.public void debug(java.lang.String theMessage)
String - theMessage A string containing the message.
public void debug(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void info(java.lang.String theMessage)
String - theMessage A string containing the message.
public void info(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void warning(java.lang.String theMessage)
String - theMessage A string containing the message.
public void warning(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void error(java.lang.String theMessage)
String - theMessage A string containing the message.
public void error(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void error(java.lang.Exception theException)
String - theMessage A string containing the message.
public void error(java.lang.Exception theException,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void syserror(java.lang.String theMessage)
String - theMessage A string containing the message.
public void syserror(java.lang.String theMessage,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void syserror(java.lang.Exception theException)
String - theMessage A string containing the message.
public void syserror(java.lang.Exception theException,
boolean isModal,
boolean isLogged)
String - theMessage A string containing the message.boolean - isModal true if the user must be forced to acknowlege this message.
Only meaningful if a GUI is in use.boolean - isLogged true if this message is to be stored somewhere.public void setAutoFlush(boolean flushEveryMessage)
boolean - flushEveryMessage true if the log is to be flushed every time a message is written to it.public void flush()
public java.lang.String getCurrentLog()
public void setAutoLog(boolean logEveryMessageByDefault)
boolean - logEveryMessageByDefault true if messages are to be logged by default.public java.lang.String getDateFormat()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||