aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/LogBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Console/LogBase.cs')
-rw-r--r--OpenSim/Framework/Console/LogBase.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index 0036921..f7d0d1f 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -67,7 +67,19 @@ namespace OpenSim.Framework.Console
67 67
68 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); 68 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
69 69
70 Log = File.AppendText(LogFile); 70 try
71 {
72 Log = File.AppendText(LogFile);
73 }
74 catch (Exception ex)
75 {
76 System.Console.WriteLine("Unable to open log file. Do you already have another copy of OpenSim running? Permission problem?");
77 System.Console.WriteLine(ex.Message);
78 System.Console.WriteLine("");
79 System.Console.WriteLine("Application is terminating.");
80 System.Console.WriteLine("");
81 System.Threading.Thread.CurrentThread.Abort();
82 }
71 Log.WriteLine("========================================================================"); 83 Log.WriteLine("========================================================================");
72 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString()); 84 Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString());
73 } 85 }