aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/Application.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Region/Application/Application.cs
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Region/Application/Application.cs')
-rw-r--r--OpenSim/Region/Application/Application.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 4c4d315..f1db8d6 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -35,17 +35,20 @@ namespace OpenSim
35{ 35{
36 public class Application 36 public class Application
37 { 37 {
38 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
39
38 public static string iniFilePath = ""; 40 public static string iniFilePath = "";
39 41
40 //could move our main function into OpenSimMain and kill this class 42 //could move our main function into OpenSimMain and kill this class
41 [STAThread] 43 [STAThread]
42 public static void Main(string[] args) 44 public static void Main(string[] args)
43 { 45 {
46 log4net.Config.XmlConfigurator.Configure();
47
44 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 48 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
45 49
46 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); 50 Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
47 51
48
49 Console.Write("Performing compatibility checks... "); 52 Console.Write("Performing compatibility checks... ");
50 string supported = String.Empty; 53 string supported = String.Empty;
51 if (Util.IsEnvironmentSupported(ref supported)) 54 if (Util.IsEnvironmentSupported(ref supported))
@@ -75,11 +78,10 @@ namespace OpenSim
75 OpenSimMain sim = new OpenSimMain(configSource); 78 OpenSimMain sim = new OpenSimMain(configSource);
76 79
77 sim.StartUp(); 80 sim.StartUp();
78
79 81
80 while (true) 82 while (true)
81 { 83 {
82 MainLog.Instance.MainLogPrompt(); 84 MainConsole.Instance.Prompt();
83 } 85 }
84 } 86 }
85 87
@@ -112,7 +114,7 @@ namespace OpenSim
112 114
113 // Do we not always want to see exception messages? 115 // Do we not always want to see exception messages?
114// if (e.IsTerminating) 116// if (e.IsTerminating)
115 MainLog.Instance.Error("APPLICATION", msg); 117 MainConsole.Instance.Error("[APPLICATION]: " + msg);
116 118
117 // Try to post errormessage to an URL 119 // Try to post errormessage to an URL
118 try 120 try
@@ -131,6 +133,5 @@ namespace OpenSim
131 133
132 _IsHandlingException=false; 134 _IsHandlingException=false;
133 } 135 }
134
135 } 136 }
136} 137}