Overhaul debug logging

Debug logging now provides ConsoleDebug and ILog has been updated to
support the concept of debug logs. Debug logs are now controlled by
config.json instead of by preprocessor debug flag.
This commit is contained in:
Lucas Nicodemus 2020-05-19 21:14:06 -07:00
parent 19de422304
commit b76d906c59
No known key found for this signature in database
GPG key ID: A07BD9023D1664DB
5 changed files with 68 additions and 14 deletions

View file

@ -123,13 +123,25 @@ namespace TShockAPI
void Write(string message, TraceLevel level);
/// <summary>
/// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set.
/// Writes a debug string to the log file and console. Only works if the DebugLogs config option is set to true.
/// </summary>
/// <param name="message">The message to be written.</param>
void ConsoleDebug(string message);
/// <summary>
/// Writes a debug string to the log file. Only works if the DebugLogs config option is set to true.
/// </summary>
/// <param name="message">The message to be written.</param>
void ConsoleDebug(string message, params object[] args);
/// <summary>
/// Writes a debug string to the log file. Only works if the DebugLogs config option is set to true.
/// </summary>
/// <param name="message">The message to be written.</param>
void Debug(string message);
/// <summary>
/// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set.
/// Writes a debug string to the log file. Only works if the DebugLogs config option is set to true.
/// </summary>
/// <param name="format">The format of the message to be written.</param>
/// <param name="args">The format arguments.</param>