c# - How to add ThreadId and ProcessId into the log output for each entry -
is there simple way add threadid , processid logs through microsoft.extensions.logging without writing own loggingprovider?
simply following code
logger.loginformation("this test of emergency broadcast system."); should produce following or similar output. (please assume i'm talking consolelogger)
info: [{processid}:{threadid}] test of emergency broadcast system.
- for familiar serilog, i'm looking features called output template , defining global property
- please not suggest third party library
nope, there's nothing built console logger.
Comments
Post a Comment