diff options
author | Sean Dague | 2007-10-22 15:37:54 +0000 |
---|---|---|
committer | Sean Dague | 2007-10-22 15:37:54 +0000 |
commit | 6acaabefc32525aed7ded45fc15e6152895d5382 (patch) | |
tree | 1350ddbde54e72c8d96719580a416cc2f0d85d24 /OpenSim/Framework/Console/LogBase.cs | |
parent | * Major ass commit. (diff) | |
download | opensim-SC-6acaabefc32525aed7ded45fc15e6152895d5382.zip opensim-SC-6acaabefc32525aed7ded45fc15e6152895d5382.tar.gz opensim-SC-6acaabefc32525aed7ded45fc15e6152895d5382.tar.bz2 opensim-SC-6acaabefc32525aed7ded45fc15e6152895d5382.tar.xz |
revert r2162 as it completely clobbered all the work on
the ChatModule by MW and myself. Couldn't find Adam online
after that rev went in.
Diffstat (limited to 'OpenSim/Framework/Console/LogBase.cs')
-rw-r--r-- | OpenSim/Framework/Console/LogBase.cs | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index 246afa1..5a7ce4d 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs | |||
@@ -170,11 +170,8 @@ namespace OpenSim.Framework.Console | |||
170 | /// <param name="args">WriteLine-style message arguments</param> | 170 | /// <param name="args">WriteLine-style message arguments</param> |
171 | public void Verbose(string format, params object[] args) | 171 | public void Verbose(string format, params object[] args) |
172 | { | 172 | { |
173 | if (!m_silent) | 173 | WriteNewLine(ConsoleColor.Gray, format, args); |
174 | { | 174 | return; |
175 | WriteNewLine(ConsoleColor.Gray, format, args); | ||
176 | return; | ||
177 | } | ||
178 | } | 175 | } |
179 | 176 | ||
180 | /// <summary> | 177 | /// <summary> |
@@ -185,12 +182,9 @@ namespace OpenSim.Framework.Console | |||
185 | /// <param name="args">WriteLine-style message arguments</param> | 182 | /// <param name="args">WriteLine-style message arguments</param> |
186 | public void Verbose(string sender, string format, params object[] args) | 183 | public void Verbose(string sender, string format, params object[] args) |
187 | { | 184 | { |
188 | if (!m_silent) | 185 | WritePrefixLine(DeriveColor(sender), sender); |
189 | { | 186 | WriteNewLine(ConsoleColor.Gray, format, args); |
190 | WritePrefixLine(DeriveColor(sender), sender); | 187 | return; |
191 | WriteNewLine(ConsoleColor.Gray, format, args); | ||
192 | return; | ||
193 | } | ||
194 | } | 188 | } |
195 | 189 | ||
196 | /// <summary> | 190 | /// <summary> |
@@ -240,20 +234,22 @@ namespace OpenSim.Framework.Console | |||
240 | Log.Write(now); | 234 | Log.Write(now); |
241 | Log.WriteLine(format, args); | 235 | Log.WriteLine(format, args); |
242 | Log.Flush(); | 236 | Log.Flush(); |
243 | 237 | if (!m_silent) | |
244 | System.Console.Write(now); | ||
245 | try | ||
246 | { | 238 | { |
247 | if (color != ConsoleColor.White) | 239 | System.Console.Write(now); |
248 | System.Console.ForegroundColor = color; | 240 | try |
241 | { | ||
242 | if (color != ConsoleColor.White) | ||
243 | System.Console.ForegroundColor = color; | ||
249 | 244 | ||
250 | System.Console.WriteLine(format, args); | 245 | System.Console.WriteLine(format, args); |
251 | System.Console.ResetColor(); | 246 | System.Console.ResetColor(); |
252 | } | 247 | } |
253 | catch (ArgumentNullException) | 248 | catch (ArgumentNullException) |
254 | { | 249 | { |
255 | // Some older systems dont support coloured text. | 250 | // Some older systems dont support coloured text. |
256 | System.Console.WriteLine(format, args); | 251 | System.Console.WriteLine(format, args); |
252 | } | ||
257 | } | 253 | } |
258 | return; | 254 | return; |
259 | } | 255 | } |
@@ -269,16 +265,19 @@ namespace OpenSim.Framework.Console | |||
269 | 265 | ||
270 | System.Console.Write("["); | 266 | System.Console.Write("["); |
271 | 267 | ||
272 | try | 268 | if (!m_silent) |
273 | { | 269 | { |
274 | System.Console.ForegroundColor = color; | 270 | try |
275 | System.Console.Write(sender); | 271 | { |
276 | System.Console.ResetColor(); | 272 | System.Console.ForegroundColor = color; |
277 | } | 273 | System.Console.Write(sender); |
278 | catch (ArgumentNullException) | 274 | System.Console.ResetColor(); |
279 | { | 275 | } |
280 | // Some older systems dont support coloured text. | 276 | catch (ArgumentNullException) |
281 | System.Console.WriteLine(sender); | 277 | { |
278 | // Some older systems dont support coloured text. | ||
279 | System.Console.WriteLine(sender); | ||
280 | } | ||
282 | } | 281 | } |
283 | 282 | ||
284 | System.Console.Write("] \t"); | 283 | System.Console.Write("] \t"); |