diff options
author | Sean Dague | 2009-01-19 21:38:16 +0000 |
---|---|---|
committer | Sean Dague | 2009-01-19 21:38:16 +0000 |
commit | 0f289ca405f779fb5fa931f918adb64d0673cfa5 (patch) | |
tree | 6119a7569d06a068ff16dd2d27e79c72ec894b04 /OpenSim | |
parent | * Another image packet edge case. Thanks nebadon for printing a log of it (diff) | |
download | opensim-SC_OLD-0f289ca405f779fb5fa931f918adb64d0673cfa5.zip opensim-SC_OLD-0f289ca405f779fb5fa931f918adb64d0673cfa5.tar.gz opensim-SC_OLD-0f289ca405f779fb5fa931f918adb64d0673cfa5.tar.bz2 opensim-SC_OLD-0f289ca405f779fb5fa931f918adb64d0673cfa5.tar.xz |
change the appender to have a few more colors, none of which are red
From: Sean Dague <sdague@gmail.com>
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Console/OpenSimAppender.cs | 18 |
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 | } |