All Packages Class Hierarchy This Package Previous Next Index
Class edu.vt.marian.common.Debug
java.lang.Object
|
+----edu.vt.marian.common.Debug
- public class Debug
- extends Object
Class name: Debug
Class description: As the name said, this class is purely for the convienece
of debugging a big system, user don't need to recompile the
system to change the debug configuration (where to print out
message, where not), user even don't need to rerun the system.
Author: Jianxin Zhao
Finished time: June 2, 1998
Known bugs: none
Platform: jdk1.1.5 under UNIX
Time: June 22, 1998
Modified by: Jianxin Zhao
Description: add a new method -- getTraceFile() which will return the current
trace file name, this will make this class easier to use (more flexible).
-
pm
- this object will be used to measure the performance of a system, add it here will
result in smallest change in the system
-
Debug(String, String, boolean)
- This constructor will create a Debug object based on the information
in the specified file, also the stream for trace is set to according
to the trace file name and append mode
-
dumpTrace(String)
- this method will dump the data to the current trace file
-
getTraceFile()
- this method will return the current trace file name
-
GetValue(String)
- This method will return the value of the specified name, if there is
no such name in the object false will be returned
-
setTraceFile(String, boolean)
- this method may change the trace file name, if append is true the new trace file
will be appended instead of rewrite
pm
public PerformanceMeasurement pm
- this object will be used to measure the performance of a system, add it here will
result in smallest change in the system
Debug
public Debug(String debug_filename,
String trace_filename,
boolean append)
- This constructor will create a Debug object based on the information
in the specified file, also the stream for trace is set to according
to the trace file name and append mode
setTraceFile
public void setTraceFile(String trace_filename,
boolean append)
- this method may change the trace file name, if append is true the new trace file
will be appended instead of rewrite
getTraceFile
public String getTraceFile()
- this method will return the current trace file name
dumpTrace
public synchronized void dumpTrace(String data)
- this method will dump the data to the current trace file
GetValue
public boolean GetValue(String name)
- This method will return the value of the specified name, if there is
no such name in the object false will be returned
All Packages Class Hierarchy This Package Previous Next Index