|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ibisph.util.Logger
public class Logger
Title: Description: Simple message/exception logger that sends output to STDOUT and/or a specified log file. Company: STG
| Field Summary | |
|---|---|
protected static java.lang.String |
baseLogFilename
The log filename to use if none is specified in /dss/dss.properties. |
static int |
CRITICAL_ERROR
Severity value for high priority errors. |
protected static int |
currentLogFileNumber
|
protected static long |
currentLogFileSize
|
static int |
DATABASE_ERROR
Severity value for critical errors. |
protected static java.util.Date |
date
|
protected static java.text.DateFormat |
dateFormat
|
static int |
DEBUG_MSG
|
protected static int |
fileLogLevel
|
static int |
HIGH_SEVERITY_ERROR
Severity value for user specific errors. |
static int |
INFO_MSG
Severity value for debug messages. |
protected static java.io.PrintStream |
logFile
|
protected static long |
logFileMaxSize
|
protected static java.lang.String |
logFilename
|
protected static java.io.FileOutputStream |
logFileStream
|
static int |
LOW_SEVERITY_ERROR
Severity value for production informational messages. |
protected static java.lang.String |
newLine
|
protected static int |
numLogFiles
|
protected static int |
sysOutLogLevel
|
static int |
UNKNOWN_ERROR
Severity value for database problems. |
static int |
USER_SPECIFIC_ERROR
Severity value for low priority errors. |
| Constructor Summary | |
|---|---|
Logger()
|
|
Logger(java.lang.String baseLogFilename)
|
|
| Method Summary | |
|---|---|
void |
close()
|
int |
getCurrentLogFileNumber()
|
int |
getFileLogLevel()
|
java.lang.String |
getFilenameForLog(int logNumber)
Get the filename of the log with the specified number. |
long |
getLogFileMaxSize()
|
java.lang.String |
getLogFilename()
|
int |
getNumLogFiles()
|
int |
getSysOutLogLevel()
|
static void |
log(java.lang.Object object,
java.lang.String msg)
|
static void |
log(java.lang.Object object,
java.lang.String msg,
int severityLevel)
|
static void |
log(java.lang.Object object,
java.lang.String msg,
java.lang.Throwable error,
int severityLevel)
Log a message with the given severity. |
static void |
log(java.lang.String msg)
|
static void |
log(java.lang.String msg,
int severityLevel)
|
static void |
log(java.lang.String msg,
java.lang.Throwable error,
int severityLevel)
|
boolean |
logFileExists(int logFileNum)
Check to see if the log file represented by logFileNum exists yet. |
boolean |
open(java.lang.String baseLogFilename)
|
void |
setBaseLogFilename(java.lang.String logFilenameBase)
|
void |
setDateFormat(java.text.DateFormat dateFormat)
|
void |
setFileLogLevel(int logLevel)
|
void |
setFileLogLevel(java.lang.String logLevel)
|
void |
setLogFileMaxSize(long size)
|
void |
setLogFileMaxSize(java.lang.String size)
|
void |
setNumLogFiles(int numberOfFiles)
|
void |
setNumLogFiles(java.lang.String numberOfFiles)
|
void |
setSysOutLogLevel(int logLevel)
|
void |
setSysOutLogLevel(java.lang.String logLevel)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEBUG_MSG
public static final int INFO_MSG
public static final int LOW_SEVERITY_ERROR
public static final int USER_SPECIFIC_ERROR
public static final int HIGH_SEVERITY_ERROR
public static final int CRITICAL_ERROR
public static final int DATABASE_ERROR
public static final int UNKNOWN_ERROR
protected static java.lang.String baseLogFilename
protected static java.lang.String logFilename
protected static java.io.FileOutputStream logFileStream
protected static java.io.PrintStream logFile
protected static java.text.DateFormat dateFormat
protected static java.util.Date date
protected static int currentLogFileNumber
protected static long currentLogFileSize
protected static int numLogFiles
protected static long logFileMaxSize
protected static int fileLogLevel
protected static int sysOutLogLevel
protected static java.lang.String newLine
| Constructor Detail |
|---|
public Logger()
public Logger(java.lang.String baseLogFilename)
| Method Detail |
|---|
public boolean open(java.lang.String baseLogFilename)
public void close()
public int getFileLogLevel()
public int getSysOutLogLevel()
public java.lang.String getLogFilename()
public int getNumLogFiles()
public int getCurrentLogFileNumber()
public long getLogFileMaxSize()
public java.lang.String getFilenameForLog(int logNumber)
logNumber - The number of the log file. This must be greater than
zero and less than or equal to the number of log files that the server
is keeping. See Logger.getNumberOfLogFiles().
public boolean logFileExists(int logFileNum)
logFileNum - The number of the log file to check.
public void setFileLogLevel(int logLevel)
public void setSysOutLogLevel(int logLevel)
public void setLogFileMaxSize(long size)
public void setNumLogFiles(int numberOfFiles)
public void setBaseLogFilename(java.lang.String logFilenameBase)
public void setDateFormat(java.text.DateFormat dateFormat)
public void setFileLogLevel(java.lang.String logLevel)
public void setSysOutLogLevel(java.lang.String logLevel)
public void setLogFileMaxSize(java.lang.String size)
public void setNumLogFiles(java.lang.String numberOfFiles)
public static void log(java.lang.Object object,
java.lang.String msg,
java.lang.Throwable error,
int severityLevel)
msg - String holding the message to be logged.error - Optional Throwable that contains a throwable/exception to be logged.severityLevel - Optional integer flag indicating the severity level of the error.
public static void log(java.lang.String msg,
java.lang.Throwable error,
int severityLevel)
public static void log(java.lang.Object object,
java.lang.String msg,
int severityLevel)
public static void log(java.lang.String msg,
int severityLevel)
public static void log(java.lang.Object object,
java.lang.String msg)
public static void log(java.lang.String msg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||