Created
July 12, 2023 18:18
-
-
Save ChuckBryan/00121ad372eb2e7a20569200f98fb87f to your computer and use it in GitHub Desktop.
Serilog Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" /> | |
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.2" /> | |
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" /> | |
<PackageReference Include="Serilog.Extensions.Hosting" Version="5.0.1" /> | |
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" /> | |
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> | |
"Serilog": { | |
"MinimumLevel": { | |
"Default": "Debug", | |
"Override": { | |
"Microsoft": "Warning", | |
"System": "Warning" | |
} | |
}, | |
"Enrich": [ | |
"FromLogContext", | |
"WithMachineName", | |
"WithProcessId", | |
"WithThreadId" | |
], | |
"WriteTo": [ | |
{ | |
"Name": "Console", | |
"Args": { | |
"outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fffzzzz} [{Level:u3}] ({MachineName}@{ProcessId}.{ThreadId}-{SourceContext}) {Message:lj}{NewLine}{Exception}" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment