diff --git a/TShockAPI/ILog.cs b/TShockAPI/ILog.cs
index cae6755b..a2dff96f 100644
--- a/TShockAPI/ILog.cs
+++ b/TShockAPI/ILog.cs
@@ -123,13 +123,13 @@ namespace TShockAPI
void Write(string message, TraceLevel level);
///
- /// 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.
diff --git a/TShockAPI/Log.cs b/TShockAPI/Log.cs
index 93a2d0c1..85e611c7 100644
--- a/TShockAPI/Log.cs
+++ b/TShockAPI/Log.cs
@@ -154,7 +154,8 @@ namespace TShockAPI
{
ConsoleInfo(string.Format(format, args));
}
-
+
+#if DEBUG
///
/// Writes a debug string to the log file.
///
@@ -175,6 +176,7 @@ namespace TShockAPI
{
Debug(string.Format(format, args));
}
+#endif
///
/// Internal method which writes a message directly to the log file.
diff --git a/TShockAPI/SqlLog.cs b/TShockAPI/SqlLog.cs
index ef0ceba7..083f76e7 100644
--- a/TShockAPI/SqlLog.cs
+++ b/TShockAPI/SqlLog.cs
@@ -211,7 +211,9 @@ namespace TShockAPI
/// The message to be written.
public void Debug(string message)
{
+#if DEBUG
Write(message, TraceLevel.Verbose);
+#endif
}
///
@@ -221,7 +223,9 @@ 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 2a6a9f49..80caaa18 100755
--- a/TShockAPI/TSPlayer.cs
+++ b/TShockAPI/TSPlayer.cs
@@ -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
{
diff --git a/TShockAPI/TextLog.cs b/TShockAPI/TextLog.cs
index aef72b7a..464305ad 100644
--- a/TShockAPI/TextLog.cs
+++ b/TShockAPI/TextLog.cs
@@ -178,7 +178,9 @@ namespace TShockAPI
/// The message to be written.
public void Debug(string message)
{
+#if DEBUG
Write(message, TraceLevel.Verbose);
+#endif
}
///
@@ -188,7 +190,9 @@ namespace TShockAPI
/// The format arguments.
public void Debug(string format, params object[] args)
{
+#if DEBUG
Debug(string.Format(format, args));
+#endif
}
///