mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Formatting cleanup.
This commit is contained in:
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Console
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// derive an ansi color from a string, ignoring the darker colors.
|
||||
/// derive an ansi color from a string, ignoring the darker colors.
|
||||
/// This is used to help automatically bin component tags with colors
|
||||
/// in various print functions.
|
||||
/// </summary>
|
||||
@@ -195,7 +195,7 @@ namespace OpenSim.Framework.Console
|
||||
System.Console.WriteLine(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
}
|
||||
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Console
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string ReadLine()
|
||||
{
|
||||
try
|
||||
@@ -245,7 +245,7 @@ namespace OpenSim.Framework.Console
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Read()
|
||||
{
|
||||
return System.Console.Read();
|
||||
|
||||
@@ -40,32 +40,32 @@ namespace OpenSim.Framework.Console
|
||||
string loggingMessage = RenderLoggingEvent(le);
|
||||
|
||||
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
||||
|
||||
|
||||
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
||||
MatchCollection matches = RE.Matches(loggingMessage);
|
||||
// Get some direct matches $1 $4 is a
|
||||
// Get some direct matches $1 $4 is a
|
||||
if (matches.Count == 1)
|
||||
{
|
||||
System.Console.Write(matches[0].Groups["Front"].Value);
|
||||
System.Console.Write("[");
|
||||
|
||||
|
||||
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value);
|
||||
System.Console.Write("]:");
|
||||
|
||||
if (le.Level == Level.Error)
|
||||
|
||||
if (le.Level == Level.Error)
|
||||
{
|
||||
WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value);
|
||||
}
|
||||
else if (le.Level == Level.Warn)
|
||||
else if (le.Level == Level.Warn)
|
||||
{
|
||||
WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
System.Console.Write(matches[0].Groups["End"].Value);
|
||||
}
|
||||
System.Console.WriteLine();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Console.Write(loggingMessage);
|
||||
|
||||
Reference in New Issue
Block a user