aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Mono/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Mono/Program.cs')
-rw-r--r--MediaBrowser.Server.Mono/Program.cs19
1 files changed, 1 insertions, 18 deletions
diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs
index 8a34488c6..2fb983850 100644
--- a/MediaBrowser.Server.Mono/Program.cs
+++ b/MediaBrowser.Server.Mono/Program.cs
@@ -7,7 +7,6 @@ using MediaBrowser.Server.Startup.Common;
using Microsoft.Win32;
using System;
using System.Diagnostics;
-using System.IO;
using System.Net;
using System.Net.Security;
using System.Reflection;
@@ -124,7 +123,7 @@ namespace MediaBrowser.Server.Mono
{
var exception = (Exception)e.ExceptionObject;
- LogUnhandledException(exception);
+ new UnhandledExceptionWriter(_appHost.ServerConfigurationManager.ApplicationPaths, _logger, _appHost.LogManager).Log(exception);
if (!Debugger.IsAttached)
{
@@ -132,22 +131,6 @@ namespace MediaBrowser.Server.Mono
}
}
- private static void LogUnhandledException(Exception ex)
- {
- _logger.ErrorException("UnhandledException", ex);
-
- _appHost.LogManager.Flush ();
-
- var path = Path.Combine(_appHost.ServerConfigurationManager.ApplicationPaths.LogDirectoryPath, "crash_" + Guid.NewGuid() + ".txt");
-
- var builder = LogHelper.GetLogMessage(ex);
-
- Console.WriteLine ("UnhandledException");
- Console.WriteLine (builder.ToString());
-
- File.WriteAllText(path, builder.ToString());
- }
-
public static void Shutdown()
{
ApplicationTaskCompletionSource.SetResult (true);