* 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
This commit is contained in:
Justin Clarke Casey
2008-10-04 20:27:55 +00:00
parent 344e33b8fc
commit 31362a67df
2 changed files with 45 additions and 58 deletions

View File

@@ -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