diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-08-09 15:59:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-09 15:59:26 -0400 |
| commit | c2996935c8a873662e6d301f139c88df8a542ed2 (patch) | |
| tree | cf405f91e893fe6a3fc20dfa1622f027666d4848 /Emby.Common.Implementations/Logging | |
| parent | ab834f8fdffb64b562ece0512a53f361c62f7f6f (diff) | |
| parent | 7a74c705e584774534b74e11c1ab86144cb454c6 (diff) | |
Merge pull request #2800 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Common.Implementations/Logging')
| -rw-r--r-- | Emby.Common.Implementations/Logging/NlogManager.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Emby.Common.Implementations/Logging/NlogManager.cs b/Emby.Common.Implementations/Logging/NlogManager.cs index f7b723e8b..4446e2cdb 100644 --- a/Emby.Common.Implementations/Logging/NlogManager.cs +++ b/Emby.Common.Implementations/Logging/NlogManager.cs @@ -152,13 +152,23 @@ namespace Emby.Common.Implementations.Logging RemoveTarget("ApplicationLogFileWrapper"); - var wrapper = new AsyncTargetWrapper(); + // https://github.com/NLog/NLog/wiki/Performance + var wrapper = new AsyncTargetWrapper + { + OverflowAction = AsyncTargetWrapperOverflowAction.Block, + QueueLimit = 10000, + BatchSize = 500, + TimeToSleepBetweenBatches = 50 + }; + wrapper.Name = "ApplicationLogFileWrapper"; var logFile = new FileTarget { FileName = path, - Layout = "${longdate} ${level} ${logger}: ${message}" + Layout = "${longdate} ${level} ${logger}: ${message}", + KeepFileOpen = true, + ConcurrentWrites = false }; logFile.Name = "ApplicationLogFile"; |
