mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-16 04:08:10 +00:00
Issue #29: Added process Id into name of log file
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using log4net;
|
using log4net;
|
||||||
using log4net.Appender;
|
using log4net.Appender;
|
||||||
using log4net.Core;
|
using log4net.Core;
|
||||||
@@ -24,7 +25,7 @@ namespace MTApiService
|
|||||||
};
|
};
|
||||||
patternLayout.ActivateOptions();
|
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
|
var roller = new RollingFileAppender
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user