diff options
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index 0db7893e5..eca600b33 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -251,6 +251,8 @@ namespace MediaBrowser.Server.Startup.Common _remotePackageName = remotePackageName; _supportsNativeWebSocket = supportsNativeWebSocket; NativeApp = nativeApp; + + SetBaseExceptionMessage(); } private Version _version; @@ -307,6 +309,23 @@ namespace MediaBrowser.Server.Startup.Common get { return NativeApp.SupportsAutoRunAtStartup; } } + private void SetBaseExceptionMessage() + { + var builder = GetBaseExceptionMessage(ApplicationPaths); + + // Skip if plugins haven't been loaded yet + //if (Plugins != null) + //{ + // var pluginString = string.Join("|", Plugins.Select(i => i.Name + "-" + i.Version.ToString()).ToArray()); + // builder.Insert(0, string.Format("Plugins: {0}{1}", pluginString, Environment.NewLine)); + //} + + builder.Insert(0, string.Format("Version: {0}{1}", ApplicationVersion, Environment.NewLine)); + builder.Insert(0, "*** Error Report ***" + Environment.NewLine); + + LogManager.ExceptionMessagePrefix = builder.ToString(); + } + /// <summary> /// Runs the startup tasks. /// </summary> |
