-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example to demonstrate registration of the EcsTextFormatter within an AspnetCore application. #63
Conversation
… AspnetCore application. Fixes #62 - Also ensures ay access to the resolved HttpContext are null-checked before access - Also enhances parsing of the UserAgent using a static property, provided by including code from https://github.com/ua-parser/uap-csharp (Apache 2.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a couple of comments
examples/aspnetcore-with-serilog/Controllers/WeatherForecastController.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…into serilog-registration
Add example to root README
Brilliant! This does the trick nicely. Can confirm that this solves #62 for me when running locally. For some reason I didn't know you could get services from ctx.Configuration this way, so that was very useful. Totally agree that an Examples project is super useful here! I have a suggestion for the Elastic.CommonSchema.Client.Ip field to be changed to string[] and then the value be split so we have separate IPv4 and IPv6 values, but I'll submit a separate feature request for that. |
Fixes #62