diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-05-06 16:20:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-06 16:20:25 -0400 |
| commit | 21edff3ac2175190e0bca98c9a2f967c79ee57c2 (patch) | |
| tree | 6beddce4dffa97eb199da99867f6b493ce197e64 /Emby.Server.Implementations/Logging | |
| parent | 3e29d73d0c77c682e161c413703d5e36a8466885 (diff) | |
| parent | 90452d2faf5e0f34698873707e9e505df3c52f9c (diff) | |
Merge pull request #2618 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Logging')
| -rw-r--r-- | Emby.Server.Implementations/Logging/UnhandledExceptionWriter.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Logging/UnhandledExceptionWriter.cs b/Emby.Server.Implementations/Logging/UnhandledExceptionWriter.cs index 5183f3a0b..7104935e1 100644 --- a/Emby.Server.Implementations/Logging/UnhandledExceptionWriter.cs +++ b/Emby.Server.Implementations/Logging/UnhandledExceptionWriter.cs @@ -29,15 +29,17 @@ namespace Emby.Server.Implementations.Logging _logManager.Flush(); var path = Path.Combine(_appPaths.LogDirectoryPath, "unhandled_" + Guid.NewGuid() + ".txt"); - _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); + _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(path)); var builder = LogHelper.GetLogMessage(ex); // Write to console just in case file logging fails _console.WriteLine("UnhandledException"); - _console.WriteLine(builder.ToString()); - _fileSystem.WriteAllText(path, builder.ToString()); + var logMessage = builder.ToString(); + _console.WriteLine(logMessage); + + _fileSystem.WriteAllText(path, logMessage); } } } |
