From 4fdfba0b2e4febac5e24c63aa39dacdd38eeec68 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 9 Feb 2024 13:06:47 +0400 Subject: [PATCH] 100% log --- DumpTruck/DumpTruck/DumpTruck.csproj | 16 ++++++++++++++++ DumpTruck/DumpTruck/appsettings.json | 20 ++++++++++++++++++++ DumpTruck/DumpTruck/nlog.config | 14 ++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 DumpTruck/DumpTruck/appsettings.json create mode 100644 DumpTruck/DumpTruck/nlog.config diff --git a/DumpTruck/DumpTruck/DumpTruck.csproj b/DumpTruck/DumpTruck/DumpTruck.csproj index 5b2b895..1e9a273 100644 --- a/DumpTruck/DumpTruck/DumpTruck.csproj +++ b/DumpTruck/DumpTruck/DumpTruck.csproj @@ -11,9 +11,25 @@ + + + + + + + Always + + + + + + + + + \ No newline at end of file diff --git a/DumpTruck/DumpTruck/appsettings.json b/DumpTruck/DumpTruck/appsettings.json new file mode 100644 index 0000000..003b7fe --- /dev/null +++ b/DumpTruck/DumpTruck/appsettings.json @@ -0,0 +1,20 @@ +{ + "Serilog": { + "Using": [ "Serilog.Sinks.File" ], + "MinimumLevel": "Information", + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "Logs/log_.log", + "rollingInterval": "Day", + "outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}" + } + } + ], + "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ], + "Properties": { + "Application": "ArmoredTransport" + } + } +} \ No newline at end of file diff --git a/DumpTruck/DumpTruck/nlog.config b/DumpTruck/DumpTruck/nlog.config new file mode 100644 index 0000000..6472a09 --- /dev/null +++ b/DumpTruck/DumpTruck/nlog.config @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file