aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/MainStartup.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-23 17:36:40 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-23 17:36:40 -0500
commit1923de72bf3c502ba9b942ef6caa5f73a33f43d6 (patch)
tree9104da63d3f657a3cd8cb7beae70ab6ab614caf9 /MediaBrowser.ServerApplication/MainStartup.cs
parent70c5b341dbaf274ebc57743fe51b9b8e7d73d441 (diff)
consolidate exception logging
Diffstat (limited to 'MediaBrowser.ServerApplication/MainStartup.cs')
-rw-r--r--MediaBrowser.ServerApplication/MainStartup.cs16
1 files changed, 1 insertions, 15 deletions
diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs
index d98f3e265..8974ca8da 100644
--- a/MediaBrowser.ServerApplication/MainStartup.cs
+++ b/MediaBrowser.ServerApplication/MainStartup.cs
@@ -455,9 +455,7 @@ namespace MediaBrowser.ServerApplication
{
var exception = (Exception)e.ExceptionObject;
- LogUnhandledException(exception);
-
- _appHost.LogManager.Flush();
+ new UnhandledExceptionWriter(_appHost.ServerConfigurationManager.ApplicationPaths, _logger, _appHost.LogManager).Log(exception);
if (!_isRunningAsService)
{
@@ -470,18 +468,6 @@ namespace MediaBrowser.ServerApplication
}
}
- private static void LogUnhandledException(Exception ex)
- {
- _logger.ErrorException("UnhandledException", ex);
-
- var path = Path.Combine(_appHost.ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, "unhandled_" + Guid.NewGuid() + ".txt");
- Directory.CreateDirectory(Path.GetDirectoryName(path));
-
- var builder = LogHelper.GetLogMessage(ex);
-
- File.WriteAllText(path, builder.ToString());
- }
-
/// <summary>
/// Performs the update if needed.
/// </summary>