From 31362a67dfb5b1fe22100be17204e80252f261d9 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 4 Oct 2008 20:27:55 +0000 Subject: * Tidy up configuration stuff, eliminated default setting duplication along the way * This revision also makes the exception catcher of last resort print to the log instead of just the console * This means logs should now capture sim crashing exceptions, though not those which are caused by a crash of the virtual machine itself --- OpenSim/Region/Application/Application.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Application/Application.cs') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 8d2ce55..86661b8 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -27,6 +27,8 @@ using System; using System.Net; +using System.Reflection; +using log4net; using log4net.Config; using Nini.Config; using OpenSim.Framework; @@ -36,6 +38,8 @@ namespace OpenSim { public class Application { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public static string iniFilePath = ""; //could move our main function into OpenSimMain and kill this class @@ -124,9 +128,7 @@ namespace OpenSim msg += "\r\n"; msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; - // Do we not always want to see exception messages? -// if (e.IsTerminating) - MainConsole.Instance.Error("[APPLICATION]: " + msg); + m_log.ErrorFormat("[APPLICATION]: {0}", msg); // Try to post errormessage to an URL try -- cgit v1.1