aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/MainStartup.cs
diff options
context:
space:
mode:
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>