Merge pull request #896 from WhiteXZ/general-devel
DEBUG preprocessor checks for ILog
This commit is contained in:
commit
5f77f21e03
5 changed files with 14 additions and 4 deletions
|
|
@ -123,13 +123,13 @@ namespace TShockAPI
|
|||
void Write(string message, TraceLevel level);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a debug string to the log file.
|
||||
/// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to be written.</param>
|
||||
void Debug(string message);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a debug string to the log file.
|
||||
/// Writes a debug string to the log file. Only works if the DEBUG preprocessor conditional is set.
|
||||
/// </summary>
|
||||
/// <param name="format">The format of the message to be written.</param>
|
||||
/// <param name="args">The format arguments.</param>
|
||||
|
|
|
|||
|
|
@ -154,7 +154,8 @@ namespace TShockAPI
|
|||
{
|
||||
ConsoleInfo(string.Format(format, args));
|
||||
}
|
||||
|
||||
|
||||
#if DEBUG
|
||||
/// <summary>
|
||||
/// Writes a debug string to the log file.
|
||||
/// </summary>
|
||||
|
|
@ -175,6 +176,7 @@ namespace TShockAPI
|
|||
{
|
||||
Debug(string.Format(format, args));
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Internal method which writes a message directly to the log file.
|
||||
|
|
|
|||
|
|
@ -211,7 +211,9 @@ namespace TShockAPI
|
|||
/// <param name="message">The message to be written.</param>
|
||||
public void Debug(string message)
|
||||
{
|
||||
#if DEBUG
|
||||
Write(message, TraceLevel.Verbose);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -221,7 +223,9 @@ namespace TShockAPI
|
|||
/// <param name="args">The format arguments.</param>
|
||||
public void Debug(string format, params object[] args)
|
||||
{
|
||||
#if DEBUG
|
||||
Debug(string.Format(format, args));
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Write(string message, TraceLevel level)
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (displayConsole)
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Player {0} has been disabled for {1}.", Name, reason);
|
||||
TShock.Log.ConsoleInfo("Player {0} has been disabled for {1}.", Name, reason);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,7 +178,9 @@ namespace TShockAPI
|
|||
/// <param name="message">The message to be written.</param>
|
||||
public void Debug(string message)
|
||||
{
|
||||
#if DEBUG
|
||||
Write(message, TraceLevel.Verbose);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -188,7 +190,9 @@ namespace TShockAPI
|
|||
/// <param name="args">The format arguments.</param>
|
||||
public void Debug(string format, params object[] args)
|
||||
{
|
||||
#if DEBUG
|
||||
Debug(string.Format(format, args));
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue