aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/Logging/NlogManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-13 16:21:10 -0400
committerGitHub <noreply@github.com>2017-08-13 16:21:10 -0400
commitdc578f3742b474bd85d556299a6b2763f4d9acda (patch)
treecc4a8d1de140ece77160349e51a64857656ab373 /Emby.Common.Implementations/Logging/NlogManager.cs
parentf6ed934a7e32bf10c3a141773d713bf3b19e784f (diff)
parent7f200f057d33e3ef52b1b1b1bf1767577295317e (diff)
Merge pull request #2815 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Common.Implementations/Logging/NlogManager.cs')
-rw-r--r--Emby.Common.Implementations/Logging/NlogManager.cs14
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";