DEBUG preprocessor checks for ILog

This commit is contained in:
White 2015-04-08 20:46:12 +09:30
parent 371beb8c52
commit fc1d188951
6 changed files with 16 additions and 2 deletions

View file

@ -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
{
@ -858,11 +858,13 @@ namespace TShockAPI
LastDisableNotification = DateTime.UtcNow;
}
}
#if DEBUG
var trace = new StackTrace();
StackFrame frame = null;
frame = trace.GetFrame(1);
if (frame != null && frame.GetMethod().DeclaringType != null)
TShock.Log.Debug(frame.GetMethod().DeclaringType.Name + " called Disable().");
#endif
}
public virtual void Whoopie(object time)