I want to use Common.Logging to perform 2 different functions:
Standard logging (this happened at this time under these circustances)... this goes into a specific table. Targeted logging (this workflow component experienced these sorts of events)... this goes into a different table with associated metadata.
Setting up Standard Logging is easy, but I need metadata associated with the second type, (workflow id, step number, that sort of thing). With NLog, I'd pass that along in a GlobalDiagnosticsContext
method; I'm thinking something similar must exist for Common.Logging but I can't see how to capture metadata in Common.Logging and pass the information to the LoggerFactoryAdapter
to be rendered.
Is there a mechanism for doing this, or is it unsupported?
I forked Common.Logging and added this functionality.
See GitHub project or NuGet.
I also submitted a pull request for returning the changes to the main branch/project.