change the appender to have a few more colors, none of which are red

From: Sean Dague <sdague@gmail.com>
0.6.3-post-fixes
Sean Dague 2009-01-19 21:38:16 +00:00
parent 68baf9096a
commit 0f289ca405
1 changed files with 16 additions and 2 deletions

View File

@ -37,6 +37,21 @@ namespace OpenSim.Framework.Console
/// </summary>
public class OpenSimAppender : AnsiColorTerminalAppender
{
private static readonly ConsoleColor[] Colors = {
ConsoleColor.DarkBlue,
ConsoleColor.DarkGreen,
ConsoleColor.DarkCyan,
ConsoleColor.DarkMagenta,
ConsoleColor.DarkYellow,
ConsoleColor.Gray,
ConsoleColor.DarkGray,
ConsoleColor.Blue,
ConsoleColor.Green,
ConsoleColor.Cyan,
ConsoleColor.Magenta,
ConsoleColor.Yellow
};
override protected void Append(LoggingEvent le)
{
try
@ -108,8 +123,7 @@ namespace OpenSim.Framework.Console
private static ConsoleColor DeriveColor(string input)
{
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx;
return Colors[(input.ToUpper().GetHashCode() % Colors.Length)];
}
}
}