[This is preliminary documentation and is subject to change.]
Central logging class. Logs to file, relays messages to the frontend, submits crash reports.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.2 (0.6.3.2)
Syntax
| C# |
public static class Logger
Members
| All Members | Fields | Properties | Methods | Events |
| Member | Description | |
|---|---|---|
| ConsoleOptions | ||
| Crashed | Occurs when the server "crashes" (has an unhandled exception).
Note that such occurences will not always cause shutdowns - check ShutdownImminent property.
Reporting of the crash may be suppressed. | |
| CurrentLogFileName | Name of the file that log messages are currently being written to.
Does not include path to the log folder (see Paths.LogPath for that). | |
| Enabled | Gets or sets whether logging is globally enabled/disabled.
If "--nolog" command-line argument is given, logging is disabled. | |
| Log(LogType, String, array<Object>[]()[][]) | Adds a message to the server log.
Depending on server configuration and log category, message can be shown in console, logged to file, both, or neither. | |
| LogAndReportCrash(String, String, Exception, Boolean) | Logs and reports a crash or an unhandled exception.
Details are logged, and a crash report may be submitted to fCraft.net.
Note that this method may take several seconds to finish,
since it gathers system information and possibly communicates to fCraft.net. | |
| LogFileOptions | ||
| Logged | Occurs after a message has been logged. | |
| LogToConsole(String) | Logs a message of type ConsoleOutput, strips colors,
and splits into multiple messages at newlines.
Use this method for all messages of LogType.ConsoleOutput | |
| SplittingType |