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

ThreadPoolClientBranch
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
{

View File

@ -8,7 +8,7 @@
<log4net>
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5level - %message%newline" />
<conversionPattern value="%date{HH:mm:ss} - %message%newline" />
</layout>
</appender>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">