aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/LocalConsole.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Console/LocalConsole.cs')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index b17b8e0..260a86f 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -46,6 +46,11 @@ namespace OpenSim.Framework.Console
46 // private readonly object m_syncRoot = new object(); 46 // private readonly object m_syncRoot = new object();
47 private const string LOGLEVEL_NONE = "(none)"; 47 private const string LOGLEVEL_NONE = "(none)";
48 48
49 // Used to extract categories for colourization.
50 private Regex m_categoryRegex
51 = new Regex(
52 @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)", RegexOptions.Singleline | RegexOptions.Compiled);
53
49 private int m_cursorYPosition = -1; 54 private int m_cursorYPosition = -1;
50 private int m_cursorXPosition = 0; 55 private int m_cursorXPosition = 0;
51 private StringBuilder m_commandLine = new StringBuilder(); 56 private StringBuilder m_commandLine = new StringBuilder();
@@ -280,11 +285,8 @@ namespace OpenSim.Framework.Console
280 string outText = text; 285 string outText = text;
281 286
282 if (level != LOGLEVEL_NONE) 287 if (level != LOGLEVEL_NONE)
283 { 288 {
284 string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; 289 MatchCollection matches = m_categoryRegex.Matches(text);
285
286 Regex RE = new Regex(regex, RegexOptions.Singleline);
287 MatchCollection matches = RE.Matches(text);
288 290
289 if (matches.Count == 1) 291 if (matches.Count == 1)
290 { 292 {