diff --git a/AirBomber/AirBomber/AirBomber.csproj b/AirBomber/AirBomber/AirBomber.csproj
index 689a0f8..23e2c47 100644
--- a/AirBomber/AirBomber/AirBomber.csproj
+++ b/AirBomber/AirBomber/AirBomber.csproj
@@ -25,7 +25,9 @@
+
+
diff --git a/AirBomber/AirBomber/appsettings.json b/AirBomber/AirBomber/appsettings.json
index 94031e0..b525421 100644
--- a/AirBomber/AirBomber/appsettings.json
+++ b/AirBomber/AirBomber/appsettings.json
@@ -1,14 +1,56 @@
{
"Serilog": {
- "Using": [ "Serilog.Sinks.File" ],
+ "Using": [ "Serilog.Sinks.File", "Serilog.Filters.Expressions" ],
"MinimumLevel": "Information",
"WriteTo": [
{
- "Name": "File",
+ "Name": "Logger",
"Args": {
- "path": "Logs/log_.log",
- "rollingInterval": "Day",
- "outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}"
+ "configureLogger": {
+ "Filter": [
+ {
+ "Name": "ByIncludingOnly",
+ "Args": {
+ "expression": "(@Level = 'Information')"
+ }
+ }
+ ],
+ "WriteTo": [
+ {
+ "Name": "File",
+ "Args": {
+ "path": "Logs/actions_user_.log",
+ "rollingInterval": "Day",
+ "outputTemplate": "[{Timestamp:HH:mm:ss.fff}]{Level:u4}: {Message:lj}{NewLine}{Exception}"
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "Name": "Logger",
+ "Args": {
+ "configureLogger": {
+ "Filter": [
+ {
+ "Name": "ByIncludingOnly",
+ "Args": {
+ "expression": "(@Level = 'Warning' or @Level = 'Error' or @Level = 'Fatal')"
+ }
+ }
+ ],
+ "WriteTo": [
+ {
+ "Name": "File",
+ "Args": {
+ "path": "Logs/errors_.log",
+ "rollingInterval": "Day",
+ "outputTemplate": "{Message:lj} ({Timestamp:dd.MM.yyyy}){NewLine}{Exception}"
+ }
+ }
+ ]
+ }
}
}
],