Skip to content
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

Add GetMessageTemplateProperties option #305

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

dnperfors
Copy link
Contributor

Fixes #174

@nblumhardt nblumhardt merged commit cd2a857 into serilog:dev Aug 29, 2022
@nblumhardt
Copy link
Member

Looks good, thank you David 👍

@dnperfors dnperfors deleted the issue174-configurable-properties branch September 23, 2022 13:17
@PeterZaal
Copy link

Hi @nblumhardt any news on when this will be available in a new release?

@nblumhardt nblumhardt mentioned this pull request Nov 24, 2022
@nblumhardt
Copy link
Member

I've created the release PR now, @PeterZaal - thanks for the nudge! #310

Have you been using this successfully via the -dev builds?

@PeterZaal
Copy link

Hi @nblumhardt I am on the same team as @dnperfors who created this PR, and we use a copy of the modified files in our code, which works perfectly fine!

new LogEventProperty("RequestMethod", new ScalarValue(httpContext.Request.Method)),
new LogEventProperty("RequestPath", new ScalarValue(requestPath)),
new LogEventProperty("StatusCode", new ScalarValue(statusCode)),
new LogEventProperty("Elapsed", new ScalarValue(elapsedMs))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for search requests we already have another name of the variable:
"Search request {OfferSearchId} finished processing in {RequestStatus} after {ElapsedMilliseconds:N0} ms"
should we change it there to Elapsed as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customization of default properties collected by UseSerilogRequestLogging()
4 participants