diff options
Diffstat (limited to 'OpenSim/Region/Application/Application.cs')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index c94483d..ff17086 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -160,27 +160,30 @@ namespace OpenSim | |||
160 | 160 | ||
161 | m_log.ErrorFormat("[APPLICATION]: {0}", msg); | 161 | m_log.ErrorFormat("[APPLICATION]: {0}", msg); |
162 | 162 | ||
163 | // Log exception to disk | 163 | if (m_saveCrashDumps) |
164 | try | ||
165 | { | 164 | { |
166 | if (!Directory.Exists(m_crashDir)) | 165 | // Log exception to disk |
166 | try | ||
167 | { | 167 | { |
168 | Directory.CreateDirectory(m_crashDir); | 168 | if (!Directory.Exists(m_crashDir)) |
169 | } | 169 | { |
170 | string log = Util.GetUniqueFilename(ex.GetType() + ".txt"); | 170 | Directory.CreateDirectory(m_crashDir); |
171 | StreamWriter m_crashLog = | 171 | } |
172 | new StreamWriter( | 172 | string log = Util.GetUniqueFilename(ex.GetType() + ".txt"); |
173 | Path.Combine(m_crashDir, log) | 173 | StreamWriter m_crashLog = |
174 | ); | 174 | new StreamWriter( |
175 | Path.Combine(m_crashDir, log) | ||
176 | ); | ||
175 | 177 | ||
176 | m_crashLog.WriteLine(msg); | 178 | m_crashLog.WriteLine(msg); |
177 | m_crashLog.Close(); | 179 | m_crashLog.Close(); |
178 | 180 | ||
179 | File.Copy("OpenSim.ini", Path.Combine(m_crashDir, log + "_OpenSim.ini"), true); | 181 | File.Copy("OpenSim.ini", Path.Combine(m_crashDir, log + "_OpenSim.ini"), true); |
180 | } | 182 | } |
181 | catch (Exception e2) | 183 | catch (Exception e2) |
182 | { | 184 | { |
183 | m_log.ErrorFormat("[CRASH LOGGER CRASHED]: {0}", e2); | 185 | m_log.ErrorFormat("[CRASH LOGGER CRASHED]: {0}", e2); |
186 | } | ||
184 | } | 187 | } |
185 | 188 | ||
186 | _IsHandlingException = false; | 189 | _IsHandlingException = false; |