TraceSystem

The trace mechanism is the logging facility of this database. There is usually one trace system per database. It is called 'trace' because the term 'log' is already used in the database domain and means 'transaction log'. It is possible to write after close was called, but that means for each write the file will be opened and closed again (which is slower).

Methods
TraceSystem(String fileName)
Create a new trace system object.
TraceSystem(String fileName)
Create a new trace system object.
Parameters:
fileName - the file name
void close()
Close the writers, and the files if required.
void close()
Close the writers, and the files if required. It is still possible to write after closing, however after each write the file is closed again (slowing down tracing).
int getLevelFile()
int getLevelFile()
Trace getTrace(int moduleId)
Get or create a trace object for this module id.
Trace getTrace(int moduleId)
Get or create a trace object for this module id. Trace modules with id are cached.
Parameters:
moduleId - module id
Returns:
the trace object
Trace getTrace(String module)
Create a trace object for this module.
Trace getTrace(String module)
Create a trace object for this module. Trace modules with names are not cached.
Parameters:
module - the module name
Returns:
the trace object
boolean isEnabled(int level)
boolean isEnabled(int level)
void setFileName(String name)
Set the trace file name.
void setFileName(String name)
Set the trace file name.
Parameters:
name - the file name
void setLevelFile(int level)
Set the file trace level.
void setLevelFile(int level)
Set the file trace level.
Parameters:
level - the new level
void setLevelSystemOut(int level)
Set the trace level to use for System.out
void setLevelSystemOut(int level)
Set the trace level to use for System.out
Parameters:
level - the new level
void setMaxFileSize(int max)
Set the maximum trace file size in bytes.
void setMaxFileSize(int max)
Set the maximum trace file size in bytes.
Parameters:
max - the maximum size
void setName(String name)
void setName(String name)
void setSysOut(PrintStream out)
Set the print stream to use instead of System.out.
void setSysOut(PrintStream out)
Set the print stream to use instead of System.out.
Parameters:
out - the new print stream
void write(int level, int moduleId, String s, Throwable t)
void write(int level, int moduleId, String s, Throwable t)
void write(int level, String module, String s, Throwable t)
void write(int level, String module, String s, Throwable t)