aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console
diff options
context:
space:
mode:
authorMW2007-08-31 12:19:36 +0000
committerMW2007-08-31 12:19:36 +0000
commitf388a4725477b2e3238ccf19ea18dd05a98cdca0 (patch)
treeb810a65238213d357326f329df169161846547ce /OpenSim/Framework/Console
parentchange debugging around failed prim loading. I have one prim that doesn't (diff)
downloadopensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.zip
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.gz
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.bz2
opensim-SC-f388a4725477b2e3238ccf19ea18dd05a98cdca0.tar.xz
Added a Debug method to the Console/log class that has the Conditional attribute (set to "DEBUG"), so we can use that for writing extra debug info to the console. [for anyone who doesn't know about the Conditional attribute, it is a attribute that can be set on a method, and then any call to that method will on be compiled if the terms of that condition are met, ie is this case only if "DEBUG" is true. So its a cleaner implementation of the #if #endif directives].
A few other minor changes.
Diffstat (limited to 'OpenSim/Framework/Console')
-rw-r--r--OpenSim/Framework/Console/LogBase.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index 5f16303..119c2cd 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.IO; 29using System.IO;
30using System.Net; 30using System.Net;
31using System.Diagnostics;
31using System.Collections.Generic; 32using System.Collections.Generic;
32 33
33namespace OpenSim.Framework.Console 34namespace OpenSim.Framework.Console
@@ -228,7 +229,21 @@ namespace OpenSim.Framework.Console
228 WriteNewLine(ConsoleColor.Blue, format, args); 229 WriteNewLine(ConsoleColor.Blue, format, args);
229 return; 230 return;
230 } 231 }
232
233 [Conditional("DEBUG")]
234 public void Debug(string format, params object[] args)
235 {
236 WriteNewLine(ConsoleColor.Gray, format, args);
237 return;
238 }
231 239
240 [Conditional("DEBUG")]
241 public void Debug(string sender, string format, params object[] args)
242 {
243 WritePrefixLine(DeriveColor(sender), sender);
244 WriteNewLine(ConsoleColor.Gray, format, args);
245 return;
246 }
232 247
233 private void WriteNewLine(ConsoleColor color, string format, params object[] args) 248 private void WriteNewLine(ConsoleColor color, string format, params object[] args)
234 { 249 {