| Modifier and Type | Field and Description |
|---|---|
| public static final int | ADAPTER
This trace level means all type of messages should be written, but instead of using the trace file the messages should be written to SLF4J. |
| private static final int | |
| private int | checkSize
Starts at -1 so that we check the file size immediately upon open. |
| private boolean | |
| private static DateTimeFormatter | |
| public static final int | DEBUG
This trace level means all type of messages should be written. |
| private static final int | DEFAULT_MAX_FILE_SIZE
The default maximum trace file size. |
| public static final int | DEFAULT_TRACE_LEVEL_FILE
The default level for file trace messages. |
| public static final int | DEFAULT_TRACE_LEVEL_SYSTEM_OUT
The default level for system out trace messages. |
| public static final int | ERROR
This trace level means only errors should be written. |
| private String | |
| private Writer | |
| public static final int | INFO
This trace level means errors and informational messages should be written. |
| private int | |
| private int | |
| private int | |
| private int | |
| public static final int | OFF
This trace level means nothing should be written. |
| public static final int | PARENT
The parent trace level should be used. |
| private PrintWriter | |
| private PrintStream | |
| private final AtomicReferenceArray | |
| private TraceWriter | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private synchronized void | |
| private static String | |
| public int | |
| public Trace | Returns: the trace objectmodule id moduleId)Get or create a trace object for this module id. Trace modules with id are cached. |
| public Trace | |
| private static DateTimeFormatter | |
| public boolean | isEnabled(int
the level level)Implements org. Check the given trace / log level is enabled. |
| private void | |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setName(String
the new name name)Implements org. Set the name of the database or trace object. |
| public void | |
| private void | |
| public void | write(int
the trace level level, int the id of the module moduleId, String the message s, Throwable the exception (may be null) t)Implements org. Write a message. |
| public void | write(int
the trace level level, String the name of the module module, String the message s, Throwable the exception (may be null) t)Implements org. Write a message. |
| private synchronized void |
| ADAPTER | back to summary |
|---|---|
| public static final int ADAPTER This trace level means all type of messages should be written, but instead of using the trace file the messages should be written to SLF4J. | |
| CHECK_SIZE_EACH_WRITES | back to summary |
|---|---|
| private static final int CHECK_SIZE_EACH_WRITES | |
| checkSize | back to summary |
|---|---|
| private int checkSize Starts at -1 so that we check the file size immediately upon open. This Can be important if we open and close the trace file without managing to have written CHECK_SIZE_EACH_WRITES bytes each time. | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| DATE_TIME_FORMATTER | back to summary |
|---|---|
| private static DateTimeFormatter DATE_TIME_FORMATTER | |
| DEBUG | back to summary |
|---|---|
| public static final int DEBUG This trace level means all type of messages should be written. | |
| DEFAULT_MAX_FILE_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_MAX_FILE_SIZE The default maximum trace file size. It is currently 64 MB. Additionally, there could be a .old file of the same size. | |
| DEFAULT_TRACE_LEVEL_FILE | back to summary |
|---|---|
| public static final int DEFAULT_TRACE_LEVEL_FILE The default level for file trace messages. | |
| DEFAULT_TRACE_LEVEL_SYSTEM_OUT | back to summary |
|---|---|
| public static final int DEFAULT_TRACE_LEVEL_SYSTEM_OUT The default level for system out trace messages. | |
| ERROR | back to summary |
|---|---|
| public static final int ERROR This trace level means only errors should be written. | |
| fileName | back to summary |
|---|---|
| private String fileName | |
| fileWriter | back to summary |
|---|---|
| private Writer fileWriter | |
| INFO | back to summary |
|---|---|
| public static final int INFO This trace level means errors and informational messages should be written. | |
| levelFile | back to summary |
|---|---|
| private int levelFile | |
| levelMax | back to summary |
|---|---|
| private int levelMax | |
| levelSystemOut | back to summary |
|---|---|
| private int levelSystemOut | |
| maxFileSize | back to summary |
|---|---|
| private int maxFileSize | |
| OFF | back to summary |
|---|---|
| public static final int OFF This trace level means nothing should be written. | |
| PARENT | back to summary |
|---|---|
| public static final int PARENT The parent trace level should be used. | |
| printWriter | back to summary |
|---|---|
| private PrintWriter printWriter | |
| sysOut | back to summary |
|---|---|
| private PrintStream sysOut | |
| traces | back to summary |
|---|---|
| private final AtomicReferenceArray<Trace> traces | |
| writer | back to summary |
|---|---|
| private TraceWriter writer | |
| writingErrorLogged | back to summary |
|---|---|
| private boolean writingErrorLogged | |
| TraceSystem | back to summary |
|---|---|
| public TraceSystem(String fileName) Create a new trace system object.
| |
| close | back to summary |
|---|---|
| public 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). | |
| closeWriter | back to summary |
|---|---|
| private synchronized void closeWriter() | |
| format | back to summary |
|---|---|
| private static String format(String module, String s) | |
| getLevelFile | back to summary |
|---|---|
| public int getLevelFile() | |
| getTrace | back to summary |
|---|---|
| public Trace getTrace(int moduleId) Get or create a trace object for this module id. Trace modules with id are cached.
| |
| getTrace | back to summary |
|---|---|
| public Trace getTrace(String module) Create a trace object for this module. Trace modules with names are not cached. | |
| initTimeFormatter | back to summary |
|---|---|
| private static DateTimeFormatter initTimeFormatter() | |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled(int level) Implements org. Doc from org. Check the given trace / log level is enabled.
| |
| logWritingError | back to summary |
|---|---|
| private void logWritingError(Exception e) | |
| openWriter | back to summary |
|---|---|
| private boolean openWriter() | |
| setFileName | back to summary |
|---|---|
| public void setFileName(String name) Set the trace file name.
| |
| setLevelFile | back to summary |
|---|---|
| public void setLevelFile(int level) Set the file trace level.
| |
| setLevelSystemOut | back to summary |
|---|---|
| public void setLevelSystemOut(int level) Set the trace level to use for System.out
| |
| setMaxFileSize | back to summary |
|---|---|
| public void setMaxFileSize(int max) Set the maximum trace file size in bytes.
| |
| setName | back to summary |
|---|---|
| public void setName(String name) Implements org. Doc from org. Set the name of the database or trace object. | |
| setSysOut | back to summary |
|---|---|
| public void setSysOut(PrintStream out) Set the print stream to use instead of System.out.
| |
| updateLevel | back to summary |
|---|---|
| private void updateLevel() | |
| write | back to summary |
|---|---|
| public void write(int level, int moduleId, String s, Throwable t) Implements org. Doc from org. Write a message. | |
| write | back to summary |
|---|---|
| public void write(int level, String module, String s, Throwable t) Implements org. Doc from org. Write a message. | |
| writeFile | back to summary |
|---|---|
| private synchronized void writeFile(String s, Throwable t) | |