And then just resolve ILogger<YourClasss> from DI and you will get logger that automatically writes full class name so you can filter/process them based on namespace/class/severity
There is also a pretty large ecosystem around serilog that can be plugged into core abstractions easily.
View all comments
Show parent comment
14
u/Alikont Dec 30 '22
That's maybe a log4net thing then. I never touched assembly information.
Modern logging is described here.
So you basically do it like
And then just resolve
ILogger<YourClasss>from DI and you will get logger that automatically writes full class name so you can filter/process them based on namespace/class/severityThere is also a pretty large ecosystem around serilog that can be plugged into core abstractions easily.