Cysharp / ZLogger

Zero Allocation Text/Structured Logger for .NET with StringInterpolation and Source Generator, built on top of a Microsoft.Extensions.Logging.
MIT License
1.14k stars 80 forks source link

Is it possible to add thread ID and call stack information to the log output format? #26

Closed jacking75 closed 3 years ago

jacking75 commented 3 years ago

Looking at the code, it seems that only the following information can be added to the log text, but I want to leave the thread ID and callstack information as well.

public readonly struct LogInfo { public readonly string CategoryName; public readonly DateTimeOffset Timestamp; public readonly LogLevel LogLevel; public readonly EventId EventId; public readonly Exception? Exception; }

neuecc commented 3 years ago

We don't want to add anything that would be a burden on performance. Or, if you can get the IAsyncLogProcessor implemented, there may be some things you can take.