diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs
index 8b0330b3..c746dbd1 100755
--- a/TShockAPI/GetDataHandlers.cs
+++ b/TShockAPI/GetDataHandlers.cs
@@ -2469,9 +2469,7 @@ namespace TShockAPI
{
if (type == 100 || type == 164 || type == 180 || type == 261 || (type > 289 && type < 298) || (type >= 325 && type <= 328) || (type >= 345 && type <= 352))
{
-#if DEBUG
TShock.Log.Debug("Certain projectiles have been ignored for cheat detection.");
-#endif
}
else
{
@@ -2498,9 +2496,7 @@ namespace TShockAPI
{
if (type == 90 && TShock.Config.ProjIgnoreShrapnel) // Ignore crystal shards
{
-#if DEBUG
TShock.Log.Debug("Ignoring shrapnel per config..");
-#endif
}
else if (!Main.projectile[index].active)
{
diff --git a/TShockAPI/ILog.cs b/TShockAPI/ILog.cs
index 8da7284d..a2dff96f 100644
--- a/TShockAPI/ILog.cs
+++ b/TShockAPI/ILog.cs
@@ -122,20 +122,18 @@ namespace TShockAPI
/// LogLevel assosciated with the message
void Write(string message, TraceLevel level);
-#if DEBUG
///
- /// 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.
///
/// The message to be written.
void Debug(string message);
///
- /// 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.
///
/// The format of the message to be written.
/// The format arguments.
void Debug(string format, params object[] args);
-#endif
///
/// Dispose the Log
diff --git a/TShockAPI/SqlLog.cs b/TShockAPI/SqlLog.cs
index 4eb062cb..e1ebbf78 100644
--- a/TShockAPI/SqlLog.cs
+++ b/TShockAPI/SqlLog.cs
@@ -205,14 +205,15 @@ namespace TShockAPI
ConsoleInfo(string.Format(format, args));
}
-#if DEBUG
///
/// Writes a debug string to the log file.
///
/// The message to be written.
public void Debug(string message)
{
- Write(message, TraceLevel.Verbose);
+#if DEBUG
+ Write(message, TraceLevel.Verbose);\
+#endif
}
///
@@ -222,9 +223,10 @@ namespace TShockAPI
/// The format arguments.
public void Debug(string format, params object[] args)
{
+#if DEBUG
Debug(string.Format(format, args));
- }
#endif
+ }
public void Write(string message, TraceLevel level)
{
diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs
index 397b8d09..80caaa18 100755
--- a/TShockAPI/TSPlayer.cs
+++ b/TShockAPI/TSPlayer.cs
@@ -858,13 +858,11 @@ 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)
diff --git a/TShockAPI/TextLog.cs b/TShockAPI/TextLog.cs
index 6d5fe143..464305ad 100644
--- a/TShockAPI/TextLog.cs
+++ b/TShockAPI/TextLog.cs
@@ -172,14 +172,15 @@ namespace TShockAPI
ConsoleInfo(string.Format(format, args));
}
-#if DEBUG
///
/// Writes a debug string to the log file.
///
/// The message to be written.
public void Debug(string message)
{
+#if DEBUG
Write(message, TraceLevel.Verbose);
+#endif
}
///
@@ -189,9 +190,10 @@ namespace TShockAPI
/// The format arguments.
public void Debug(string format, params object[] args)
{
+#if DEBUG
Debug(string.Format(format, args));
- }
#endif
+ }
///
/// Writes a message to the log