Skip to content

Commit

Permalink
Reduce the console logs (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Jul 2, 2024
1 parent 732e6d7 commit 1681a73
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions TeachingRecordSystem/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<PackageVersion Include="Sentry.Serilog" Version="3.41.3" />
<PackageVersion Include="Serilog" Version="3.1.1" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageVersion Include="Serilog.Expressions" Version="5.0.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Serilog.Formatting.Compact" Version="2.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@
"IncludeActivityData": true,
"MaxRequestBodySize": "None",
"TracesSampleRate": 0
},
"Serilog": {
"Filter": [
{
"Name": "ByIncludingOnly",
"Args": {
"expression": "@l = 'Error' or StartsWith(@m, 'Request finished')"
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"MinimumLevel": {
"Default": "Information"
},
"Enrich": [ "FromLogContext" ]
"Enrich": [ "FromLogContext" ],
"Using": [ "Serilog.Expressions" ]
},
"AllowedHosts": "*",
"RecurringJobs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,15 @@
"IncludeActivityData": true,
"MaxRequestBodySize": "None",
"TracesSampleRate": 0
},
"Serilog": {
"Filter": [
{
"Name": "ByIncludingOnly",
"Args": {
"expression": "@l = 'Error' or StartsWith(@m, 'Request finished')"
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"Enrich": [ "FromLogContext" ]
"Enrich": [ "FromLogContext" ],
"Using": [ "Serilog.Expressions" ]
},
"AllowedHosts": "*",
"RequestTrnSupportEmail": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<PackageReference Include="PdfSharpCore" />
<PackageReference Include="Polly.Core" />
<PackageReference Include="Scrutor" />
<PackageReference Include="Serilog.Expressions" />
<PackageReference Include="System.Net.Http.Json" />
<PackageReference Include="Sentry.Serilog" />
<PackageReference Include="Serilog.Formatting.Compact" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
{
"Serilog": {
"Filter": [
{
"Name": "ByIncludingOnly",
"Args": {
"expression": "@l = 'Error' or StartsWith(@m, 'Request finished')"
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"Enrich": [ "FromLogContext" ]
"Enrich": [ "FromLogContext" ],
"Using": [ "Serilog.Expressions" ]
},
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Serilog": {
"MinimumLevel": {
"Default": "Information"
"Default": "Error"
},
"Enrich": [ "FromLogContext" ]
},
Expand Down

0 comments on commit 1681a73

Please sign in to comment.