From e4b8d76b108725fa83dd1e1f3eb909b39482e769 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 19 May 2010 04:17:56 +0100 Subject: Change appender to deal with line feeds more intelligently. Change migration error reporting to not truncate the statement when reporting. It's a bit messier than the old error reporting, but at least one gets an idea of what could be wrong again. And things look a lot neater now. --- OpenSim/Data/Migration.cs | 2 +- OpenSim/Framework/Console/OpenSimAppender.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index e54296d..6d4807f 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -206,7 +206,7 @@ namespace OpenSim.Data } catch (Exception e) { - m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message); + m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " ")); m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); ExecuteScript("ROLLBACK;"); } diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs index 282ad38..72a251e 100644 --- a/OpenSim/Framework/Console/OpenSimAppender.cs +++ b/OpenSim/Framework/Console/OpenSimAppender.cs @@ -66,7 +66,10 @@ namespace OpenSim.Framework.Console } else { - System.Console.WriteLine(loggingMessage); + if (!loggingMessage.EndsWith("\n")) + System.Console.WriteLine(loggingMessage); + else + System.Console.Write(loggingMessage); } } catch (Exception e) -- cgit v1.1