diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Console/OpenSimAppender.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs index fb3c7c2..6b1ba39 100644 --- a/OpenSim/Framework/Console/OpenSimAppender.cs +++ b/OpenSim/Framework/Console/OpenSimAppender.cs | |||
@@ -15,7 +15,7 @@ namespace OpenSim.Framework.Console | |||
15 | override protected void Append(LoggingEvent le) | 15 | override protected void Append(LoggingEvent le) |
16 | { | 16 | { |
17 | string loggingMessage = RenderLoggingEvent(le); | 17 | string loggingMessage = RenderLoggingEvent(le); |
18 | string regex = @"^(?<Front>.*)\[(?<Category>\w+)\](?<End>.*)"; | 18 | string regex = @"^(?<Front>.*?)\[(?<Category>\w+)\]:?(?<End>.*)"; |
19 | 19 | ||
20 | Regex RE = new Regex(regex, RegexOptions.Multiline); | 20 | Regex RE = new Regex(regex, RegexOptions.Multiline); |
21 | MatchCollection matches = RE.Matches(loggingMessage); | 21 | MatchCollection matches = RE.Matches(loggingMessage); |
@@ -26,8 +26,21 @@ namespace OpenSim.Framework.Console | |||
26 | System.Console.Write("["); | 26 | System.Console.Write("["); |
27 | 27 | ||
28 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); | 28 | WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); |
29 | System.Console.Write("]"); | 29 | System.Console.Write("]:"); |
30 | System.Console.WriteLine(matches[0].Groups["End"].Value); | 30 | |
31 | if (le.Level == Level.Error) | ||
32 | { | ||
33 | WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value); | ||
34 | } | ||
35 | else if (le.Level == Level.Warn) | ||
36 | { | ||
37 | WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value); | ||
38 | } | ||
39 | else | ||
40 | { | ||
41 | System.Console.Write(matches[0].Groups["End"].Value); | ||
42 | } | ||
43 | System.Console.WriteLine(); | ||
31 | } | 44 | } |
32 | else | 45 | else |
33 | { | 46 | { |