From ba7b50e241cb443e8cd0f69b651596e508d974ab Mon Sep 17 00:00:00 2001 From: vdemydiuk Date: Mon, 7 Nov 2016 13:05:36 +0200 Subject: [PATCH] Issue #29: Added process Id into name of log file --- MTApiService/LogConfigurator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MTApiService/LogConfigurator.cs b/MTApiService/LogConfigurator.cs index ca1beef8..ef6c3692 100755 --- a/MTApiService/LogConfigurator.cs +++ b/MTApiService/LogConfigurator.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using log4net; using log4net.Appender; using log4net.Core; @@ -24,7 +25,7 @@ namespace MTApiService }; patternLayout.ActivateOptions(); - string filename = $"{DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss")}.{LogFileNameExtension}"; + string filename = $"{DateTime.Now.ToString("yyyy-dd-M--HH-mm-ss")}-{Process.GetCurrentProcess().Id}.{LogFileNameExtension}"; var roller = new RollingFileAppender {