diff options
author | Melanie | 2010-10-09 01:07:41 +0100 |
---|---|---|
committer | Melanie | 2010-10-09 01:07:41 +0100 |
commit | 231feab57ff1e6d92388b75645382c865e65dea2 (patch) | |
tree | 014c2218919051fdbb995c844ebb322145e1c36b /OpenSim/Framework/Console | |
parent | Fix a security relevant issue with take / take copy (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-231feab57ff1e6d92388b75645382c865e65dea2.zip opensim-SC_OLD-231feab57ff1e6d92388b75645382c865e65dea2.tar.gz opensim-SC_OLD-231feab57ff1e6d92388b75645382c865e65dea2.tar.bz2 opensim-SC_OLD-231feab57ff1e6d92388b75645382c865e65dea2.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Conflicts:
OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
Diffstat (limited to 'OpenSim/Framework/Console')
-rw-r--r-- | OpenSim/Framework/Console/LocalConsole.cs | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 6043094..5f2f404 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console | |||
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // private readonly object m_syncRoot = new object(); | 46 | // private readonly object m_syncRoot = new object(); |
47 | private const string LOGLEVEL_NONE = "(none)"; | ||
47 | 48 | ||
48 | private int y = -1; | 49 | private int y = -1; |
49 | private int cp = 0; | 50 | private int cp = 0; |
@@ -278,22 +279,25 @@ namespace OpenSim.Framework.Console | |||
278 | 279 | ||
279 | private void WriteLocalText(string text, string level) | 280 | private void WriteLocalText(string text, string level) |
280 | { | 281 | { |
281 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; | ||
282 | |||
283 | Regex RE = new Regex(regex, RegexOptions.Multiline); | ||
284 | MatchCollection matches = RE.Matches(text); | ||
285 | |||
286 | string outText = text; | 282 | string outText = text; |
287 | 283 | ||
288 | if (matches.Count == 1) | 284 | if (level != LOGLEVEL_NONE) |
289 | { | 285 | { |
290 | outText = matches[0].Groups["End"].Value; | 286 | string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; |
291 | System.Console.Write(matches[0].Groups["Front"].Value); | 287 | |
288 | Regex RE = new Regex(regex, RegexOptions.Multiline); | ||
289 | MatchCollection matches = RE.Matches(text); | ||
292 | 290 | ||
293 | System.Console.Write("["); | 291 | if (matches.Count == 1) |
294 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), | 292 | { |
295 | matches[0].Groups["Category"].Value); | 293 | outText = matches[0].Groups["End"].Value; |
296 | System.Console.Write("]:"); | 294 | System.Console.Write(matches[0].Groups["Front"].Value); |
295 | |||
296 | System.Console.Write("["); | ||
297 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), | ||
298 | matches[0].Groups["Category"].Value); | ||
299 | System.Console.Write("]:"); | ||
300 | } | ||
297 | } | 301 | } |
298 | 302 | ||
299 | if (level == "error") | 303 | if (level == "error") |
@@ -308,7 +312,7 @@ namespace OpenSim.Framework.Console | |||
308 | 312 | ||
309 | public override void Output(string text) | 313 | public override void Output(string text) |
310 | { | 314 | { |
311 | Output(text, "normal"); | 315 | Output(text, LOGLEVEL_NONE); |
312 | } | 316 | } |
313 | 317 | ||
314 | public override void Output(string text, string level) | 318 | public override void Output(string text, string level) |