make a couple more changes to get us back very close to old color scheme

This commit is contained in:
Sean Dague
2008-02-06 20:59:31 +00:00
parent aa9d3f7aed
commit caa255bcdf
2 changed files with 17 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ namespace OpenSim.Framework.Console
override protected void Append(LoggingEvent le)
{
string loggingMessage = RenderLoggingEvent(le);
string regex = @"^(?<Front>.*)\[(?<Category>\w+)\](?<End>.*)";
string regex = @"^(?<Front>.*?)\[(?<Category>\w+)\]:?(?<End>.*)";
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(loggingMessage);
@@ -26,8 +26,21 @@ namespace OpenSim.Framework.Console
System.Console.Write("[");
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value);
System.Console.Write("]");
System.Console.WriteLine(matches[0].Groups["End"].Value);
System.Console.Write("]:");
if (le.Level == Level.Error)
{
WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value);
}
else if (le.Level == Level.Warn)
{
WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value);
}
else
{
System.Console.Write(matches[0].Groups["End"].Value);
}
System.Console.WriteLine();
}
else
{