|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.log.Log
The Log class defines common logging calls and abstract methods that must be implemented by each type of logging class. It also defines log levels that the logging classes will recognize.
Field Summary | |
static Log |
out
|
static int |
TRACE_ALL
|
static int |
TRACE_ALL_ON
|
static int |
TRACE_ARCHIVE
|
static int |
TRACE_CERTIFIED
|
static int |
TRACE_CRITICAL
|
static int |
TRACE_ENTERS_AND_EXITS
|
static int |
TRACE_FATAL
|
static int |
TRACE_HOUSEKEEPING
|
static int |
TRACE_INFO
|
static int |
TRACE_MSGS
|
static int |
TRACE_NONE
|
static int |
TRACE_PARMS
|
static int |
TRACE_READ_MSGS
|
static int |
TRACE_WARNING
|
static int |
TRACE_WRITE_MSGS
|
protected int |
traceLevel
integer data type defining current trace level for the log object. |
Constructor Summary | |
Log()
|
Method Summary | |
abstract void |
close()
Close the log. |
abstract PrintStream |
getLogfile()
Retrieves the PrintStream object for the logfile. |
int |
getTraceLevel()
Retrieves the current Trace Level setting. |
static String |
getTraceLevelString(int traceInt)
Decodes the input trace integer values to a string representing the trace level |
abstract void |
open()
Open the log file with the existing id string, logname, and logDirectory. |
abstract void |
open(String id,
String logName,
String logDir)
Open the log file using the input id string, logname, and logDirectory. |
static int |
parseTraceLevel(String traceString)
Decodes the input traceString values to a numeric value. |
abstract void |
printError(Object reporter,
int errorSeverity,
Throwable excep,
String shortDescription,
String otherDescription)
Print Errors to the log. |
void |
println(int traceType,
Object msg)
Prints the input object to the log if the input trace level is turned on |
void |
println(int traceType,
String msg)
Prints the input message text to the log, if the input trace level is turned on |
void |
println(int traceType,
String fromClass,
Object msg)
Prints the input object and the class from which it was called to the log if the input trace level is turned on |
void |
println(int traceType,
String fromClass,
String msg)
Prints the input message text and the class from which it was called to the log if the input trace level is turned on |
void |
println(Object msg)
Prints the input object to the log. |
void |
println(String msg)
Prints the input message text to the log. |
void |
println(String fromClass,
Object msg)
Prints the input object and the class from which it was called to the log. |
void |
println(String fromClass,
String msg)
Prints the input message text and the class from which it was called to the log. |
void |
putTraceLevel(int newTraceLevel)
Sets the current Trace Level setting to the input integer. |
void |
putTraceLevel(String traceString)
Sets the current Trace Level setting to the string representation of the trace level (TRACE_NONE for example). |
abstract void |
rollOver(long currentTime)
Shuts/Re-opens the log file. |
abstract void |
setName(String id,
String logName,
String logDir)
Sets the log filename variables to the input id string, logname, and logDirectory. |
static void |
setOut(String server)
Opens a stdout file for the input server name. |
abstract void |
setrollOverTime(int time)
Sets the userlog rollover time - currently not used. |
boolean |
traceOn(int traceType)
Tests to see if the input trace level is currently on. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static Log out
protected int traceLevel
public static final int TRACE_NONE
public static final int TRACE_ENTERS_AND_EXITS
public static final int TRACE_PARMS
public static final int TRACE_MSGS
public static final int TRACE_READ_MSGS
public static final int TRACE_WRITE_MSGS
public static final int TRACE_ALL
public static final int TRACE_CERTIFIED
public static final int TRACE_CRITICAL
public static final int TRACE_FATAL
public static final int TRACE_WARNING
public static final int TRACE_INFO
public static final int TRACE_ARCHIVE
public static final int TRACE_HOUSEKEEPING
public static final int TRACE_ALL_ON
Constructor Detail |
public Log()
Method Detail |
public abstract void open(String id, String logName, String logDir)
id
- the text to start the filename withlogName
- the common part of the filenamelogDir
- the directory for the filenamepublic abstract void open()
public abstract void setName(String id, String logName, String logDir)
id
- the text to start the filename withlogName
- the common part of the filenamelogDir
- the directory for the filenamepublic abstract void close()
public abstract void setrollOverTime(int time)
time
- the rollover time in seconds.public abstract PrintStream getLogfile()
public abstract void rollOver(long currentTime)
currentTime
- the current time in milliseconds.public abstract void printError(Object reporter, int errorSeverity, Throwable excep, String shortDescription, String otherDescription)
reporter
- the object reporting the errorerrorSeverity
- the Code for the severity of the Errorexcep
- an the Exception or Throwable objectshortDescription
- a short textual description of the errorotherDescription
- any text that can add additional information
to describe the error.public final void println(String fromClass, String msg)
fromClass
- the name of the class invoking the printmsg
- the text to printpublic final void println(String msg)
msg
- the text to printpublic final void println(String fromClass, Object msg)
fromClass
- the name of the class invoking the printmsg
- the object to printpublic final void println(Object msg)
msg
- the object to printpublic final void println(int traceType, String fromClass, String msg)
traceType
- the trace level to compare tofromClass
- the name of the class invoking the printmsg
- the text to printpublic final void println(int traceType, String msg)
traceType
- the trace level to compare tomsg
- the text to printpublic final void println(int traceType, String fromClass, Object msg)
traceType
- the trace level to compare tofromClass
- the name of the class invoking the printmsg
- the object to printpublic final void println(int traceType, Object msg)
traceType
- the trace level to compare tomsg
- the object to printpublic final int getTraceLevel()
public final void putTraceLevel(int newTraceLevel)
newTraceLevel
- the new trace levelpublic final void putTraceLevel(String traceString)
traceString
- the new trace levelpublic final boolean traceOn(int traceType)
traceType
- the trace level to test againstpublic static final int parseTraceLevel(String traceString)
traceString
- a list of trace levels such as
TRACE_MSGS+TRACE_ENTERS_AND_EXITSint
- the numeric trace levelpublic static String getTraceLevelString(int traceInt)
traceInt
- the input trace levelString
- for the trace level such as TRACE_MSGSpublic static void setOut(String server)
server
- the name of the server to open the file for
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |