attempt to make our logging at least fail gracefully, we'll see if this helps
parent
980a926a4b
commit
741f753c56
|
@ -14,9 +14,11 @@ namespace OpenSim.Framework.Console
|
||||||
{
|
{
|
||||||
override protected void Append(LoggingEvent le)
|
override protected void Append(LoggingEvent le)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
string loggingMessage = RenderLoggingEvent(le);
|
string loggingMessage = RenderLoggingEvent(le);
|
||||||
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
||||||
|
|
||||||
|
|
||||||
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
||||||
MatchCollection matches = RE.Matches(loggingMessage);
|
MatchCollection matches = RE.Matches(loggingMessage);
|
||||||
// Get some direct matches $1 $4 is a
|
// Get some direct matches $1 $4 is a
|
||||||
|
@ -47,6 +49,11 @@ namespace OpenSim.Framework.Console
|
||||||
System.Console.Write(loggingMessage);
|
System.Console.Write(loggingMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("Couldn't write out log message", e.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void WriteColorText(ConsoleColor color, string sender)
|
private void WriteColorText(ConsoleColor color, string sender)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue