edu.vt.marian.server
Class log_manager
java.lang.Object
|
+--edu.vt.marian.server.log_manager
- public class log_manager
- extends java.lang.Object
class name: log_manager
class description: this class manage the log data of the system.
uses the services of class(es):
designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu)
implementator(s): Ning Chai (nchai@csgrad.cs.vt.edu)
finished time: Nov 30th, 1998
known bugs:
JDK version: 1.1.5
side effects:
|
Constructor Summary |
log_manager(java.lang.String dir_name,
edu.vt.marian.common.Debug debug)
method description: this constructor will create a log manager object
from the specified directory
uses the services of class(es):
input parameter(s):
file_name -- this directory contains all the configuration
information for log manager, it's also the directory to
write log data
debug -- used for debugging
output parameter(s): none
return value: none
synchronization: none |
|
Method Summary |
int |
exit(java.lang.String condition)
method description: this method will let this object exit smoothly,
release resources it occupied andf kill threads it created. |
int |
get_logging_level()
method description: this method will return the current logging level
of this object. |
int |
set_logging_level(int level)
method description: this method will set the logging level of this object,
the higher the level, more detailed the logging
uses the services of class(es): none
input parameter(s):
level -- this will be the new logging level of this log manager
output parameter(s): none
return value:
OK
-- the new level has been set
ALREADY_EXIT
-- the exit_flag is true
INVALID_LEVEL
-- the new level can't be set since the value is not supported
yet
synchronization: synchronized |
int |
write_log(int log_level,
java.lang.String caller_desc,
java.lang.String message)
method description: this method will process the log data sent by the system
uses the services of class(es):
input parameter(s):
log_level
-- the log level of the data sent by source
caller_desc
-- specify the source send this message
message
-- the message sent by the source
output parameter(s): none
return value:
OK -- the datd has been logged correctly
ALREADY_EXIT -- the exit_flag is true
LOGGING_LEVEL_TOO_LOW
-- the system's logging_level is lower than requested logging level
other -- |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
OK
public static final int OK
ALREADY_EXIT
public static final int ALREADY_EXIT
INVALID_LEVEL
public static final int INVALID_LEVEL
LOGGING_LEVEL_TOO_LOW
public static final int LOGGING_LEVEL_TOO_LOW
log_manager
public log_manager(java.lang.String dir_name,
edu.vt.marian.common.Debug debug)
- method description: this constructor will create a log manager object
from the specified directory
uses the services of class(es):
input parameter(s):
file_name -- this directory contains all the configuration
information for log manager, it's also the directory to
write log data
debug -- used for debugging
output parameter(s): none
return value: none
synchronization: none
set_logging_level
public int set_logging_level(int level)
- method description: this method will set the logging level of this object,
the higher the level, more detailed the logging
uses the services of class(es): none
input parameter(s):
level -- this will be the new logging level of this log manager
output parameter(s): none
return value:
OK
-- the new level has been set
ALREADY_EXIT
-- the exit_flag is true
INVALID_LEVEL
-- the new level can't be set since the value is not supported
yet
synchronization: synchronized
get_logging_level
public int get_logging_level()
- method description: this method will return the current logging level
of this object.
uses the services of class(es): none
input parameter(s): none
output parameter(s): none
return value:
an integer specifies the current logging level of this object
synchronization: none
exit
public int exit(java.lang.String condition)
- method description: this method will let this object exit smoothly,
release resources it occupied andf kill threads it created.
uses the services of class(es):
input parameter(s):
condition -- specifies the condition under which this method
is called
output parameter(s): none
return value:
OK -- the exit is smooth
ALREADY_EXIT -- the exit_flag is true
other --
synchronization: synchronized
write_log
public int write_log(int log_level,
java.lang.String caller_desc,
java.lang.String message)
- method description: this method will process the log data sent by the system
uses the services of class(es):
input parameter(s):
log_level
-- the log level of the data sent by source
caller_desc
-- specify the source send this message
message
-- the message sent by the source
output parameter(s): none
return value:
OK -- the datd has been logged correctly
ALREADY_EXIT -- the exit_flag is true
LOGGING_LEVEL_TOO_LOW
-- the system's logging_level is lower than requested logging level
other --