The concept of enriching logged data revolves around registering additional context, or data, that should go together with the log messages. This context can be anything - from a simple string to a complex object, and it gets produced or known at some moment within the infrastructure or business code, not at the moment when the log messages are written. So, we cannot simply add another property to log messages, as this code does not produce any logging output, or we want the context to get attached to multiple log messages that may be, or may be not, produced down the execution chain. This context may be even conditional - such as adding specific data only to error log messages while all other messages do not need it.
Dmitrii Slabko
Accomplished software developer with 25+ years of experience. Focus on .NET technologies.
Receive Stories from @dmitriislabko
L O A D I N G
. . . comments & more!