aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Console/OpenSimAppender.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index fa26d22..a11d877 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -37,6 +37,21 @@ namespace OpenSim.Framework.Console
37 /// </summary> 37 /// </summary>
38 public class OpenSimAppender : AnsiColorTerminalAppender 38 public class OpenSimAppender : AnsiColorTerminalAppender
39 { 39 {
40 private static readonly ConsoleColor[] Colors = {
41 ConsoleColor.DarkBlue,
42 ConsoleColor.DarkGreen,
43 ConsoleColor.DarkCyan,
44 ConsoleColor.DarkMagenta,
45 ConsoleColor.DarkYellow,
46 ConsoleColor.Gray,
47 ConsoleColor.DarkGray,
48 ConsoleColor.Blue,
49 ConsoleColor.Green,
50 ConsoleColor.Cyan,
51 ConsoleColor.Magenta,
52 ConsoleColor.Yellow
53 };
54
40 override protected void Append(LoggingEvent le) 55 override protected void Append(LoggingEvent le)
41 { 56 {
42 try 57 try
@@ -108,8 +123,7 @@ namespace OpenSim.Framework.Console
108 123
109 private static ConsoleColor DeriveColor(string input) 124 private static ConsoleColor DeriveColor(string input)
110 { 125 {
111 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; 126 return Colors[(input.ToUpper().GetHashCode() % Colors.Length)];
112 return (ConsoleColor) colIdx;
113 } 127 }
114 } 128 }
115} 129}