1

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?

Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
  • Related: http://stackoverflow.com/questions/2118626/dynamically-setting-a-log4net-property-using-common-logging – Danny Varod Jun 03 '14 at 09:59

1 Answers1

1

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.

Danny Varod
  • 17,324
  • 5
  • 69
  • 111