How do caller information attributes fit into structured logging?
It seems like the standard Microsoft
I know that caller information can be added for source-generated logging with
How are you dealing with injecting caller information at scale in your code base?
I thought creating an interface
which is injected everywhere instead of a plain
but this approach seems subpar
Ilogger takes structured arguments with as params object[] , making it hard to combine it with caller attributes such as [CallerMemberName] .I know that caller information can be added for source-generated logging with
[LoggerMessage] or [LogProperties] attributes on an ad-hoc basis, but I'm looking for an infrastructural solution.How are you dealing with injecting caller information at scale in your code base?
I thought creating an interface
which is injected everywhere instead of a plain
ILogger and have the implementation bebut this approach seems subpar
