|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--amber.utility.Log
| Field Summary | |
protected java.io.FileWriter |
logFile
This is the file to log to. |
static int |
LoggingDebug
|
static int |
LoggingHigh
|
static int |
LoggingLow
|
static int |
LoggingMedium
|
static int |
LoggingOff
The level of logging |
static int |
LoggingVerbose
|
protected int |
logLevel
This is the level of logging. |
protected java.io.PrintWriter |
logPrinter
This is the PrintWriter object derived from the log FileWriter. |
| Constructor Summary | |
Log()
Default Constructor. |
|
Log(java.io.FileWriter logFile,
int logLevel)
Initialising Constructor. |
|
| Method Summary | |
java.io.FileWriter |
getLogFile()
Gets the data in the following variable: This is the file to log to. |
int |
getLogLevel()
Gets the data in the following variable: This is the level of logging. |
java.io.PrintWriter |
getLogPrinter()
Gets the data in the following variable: This is the file printer to log to. |
boolean |
isLogToConsole()
Returns the state of the console logging. |
void |
logException(int level,
java.lang.Exception ex)
This function logs an exception to the specified file. |
void |
logException(int level,
java.lang.String message,
java.lang.Exception ex)
This function logs an exception to the specified file. |
void |
logString(int level,
java.lang.String logLine)
This function logs a string to the specified file. |
void |
setLogFile(java.io.FileWriter data)
Sets the data in the following variable: This is the file to log to. |
void |
setLogLevel(int data)
Sets the data in the following variable: This is the level of logging. |
void |
setLogToConsole(boolean state)
Sets the log object to log to the console as well as the log file. |
java.lang.String |
toString()
This function returns the String form of the data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LoggingOff
public static final int LoggingLow
public static final int LoggingMedium
public static final int LoggingHigh
public static final int LoggingDebug
public static final int LoggingVerbose
protected java.io.FileWriter logFile
protected java.io.PrintWriter logPrinter
protected int logLevel
| Constructor Detail |
public Log()
public Log(java.io.FileWriter logFile,
int logLevel)
logFile - This is the file to log to.logLevel - This is the level of logging. Levels below this will not be logged.| Method Detail |
public void logString(int level,
java.lang.String logLine)
level - int containing the level of logging.logLine - String containing the line to send to the log.
public void logException(int level,
java.lang.String message,
java.lang.Exception ex)
level - int containing the level of logging.messge - String message which is printed before the exception.ex - Exception to send to the log.
public void logException(int level,
java.lang.Exception ex)
level - int containing the level of logging.ex - Exception to send to the log.public java.io.FileWriter getLogFile()
public java.io.PrintWriter getLogPrinter()
public int getLogLevel()
public boolean isLogToConsole()
public void setLogToConsole(boolean state)
state - boolean state of this condition. true is log to the
error stream of the console.public void setLogFile(java.io.FileWriter data)
data - FileWriter containing the data to set the variable to.public void setLogLevel(int data)
data - int containing the data to set the variable to.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||