vendredi 16 février 2018

Serilog: WriteTo the HttpRequest.Items Or Request object

I want to be able to track the logging based on each request of a user. So when an error is thrown from somewhere in my application, I can attach the current request log from Serilog.

Something like this.

  • Method Call
    • Logging something 1
  • Method Call
    • Logging something 2
  • Method Call
    • Logging something 3
  • Method Call
    • Logging something 4

Throw Exception ("Logging Something 1,Logging Something 2, Logging Something 3, Logging Something 4")

This is what I am looking for.

Thanks!




Aucun commentaire:

Enregistrer un commentaire