mattwcole/gelf-extensions-logging

How to add client ip etc

meataxe opened this issue · 1 comments

Maybe a dumb question, but I'm not super familiar with logging in asp.net core and I can't see where to add fields like current user, client ip etc that would be available on the HttpContext but not available as part of this call .ConfigureLogging((context, builder) => builder.AddGelf(...?

Hi, sorry for the delay getting back to you. You can use a middleware like this one to add information about the current request as fields. Let me know if you have any other questions.