[This is preliminary documentation and is subject to change.]
C# |
public static class Logger
All Members | Methods | Properties | |||
Icon | Member | Description |
---|---|---|
Capacity |
Gets or sets the capacity of the log buffer. Must be set before the
first item logged.
| |
GetLogs()()()() |
Retrieves all the logs currently in the log buffer, one per line, ending
with the most recent.
| |
LogError(String, array<Object>[]()[][]) | Logs an error to the log file. | |
LoggerLevel | Gets or sets a value indicating the level of logging required.
| |
LogInfo(String, array<Object>[]()[][]) | Logs information to the log file. | |
LogVerbose(String, array<Object>[]()[][]) | Logs verbose detail to the log file. | |
LogWarning(String, array<Object>[]()[][]) | Logs a warning to the log file. | |
WriteLogToFile()()()() | Writes the current contents of the log buffer to a log file.
|
The Trace class was not used because of insurmountable difficulties with it (It kept randomly stopping tracing output.) Instead a CircularBuffer is used to store log strings, which means that it holds only the last n logged strings. You can set this capacity using the Capacity property, but you must do this before the first item logged.
Each call to a logging method formats the text logged as follows:
P C [date and time] Thread: [thread name] Session: [session number]
[text]
P is the character !, ?, -, or a space, depending on the level
of the method call made - error, warn, info or verbose respectively. C is the
character s, a or v, aligned in different columns, depending on the
ExecutionContext.
Object | |
Logger |