How can I enable WCF logging so that it writes to a Database?

后端 未结 3 690
梦谈多话
梦谈多话 2021-01-12 03:59

I\'d like to be able to log message information in a database, and I\'m trying to decide how best to do that. Is it possible to configure the WCF logging mechanisms to write

3条回答
  •  耶瑟儿~
    2021-01-12 04:06

    If you don't need the whole SOAP-message, I would suggest to use log4net with custom IParameterInspector or IDispatchMessageInspector implementation, cause in this case you can write to log only what you need. Otherwise, take marc_s's solution.

提交回复
热议问题