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

Fix custom format string parsing #1366

Merged
merged 2 commits into from Oct 5, 2019

Conversation

martinh2011
Copy link
Contributor

What issue does this PR address?
fixes #1353

Does this PR introduce a breaking change?
No

Please check if the PR fulfills these requirements

  • The commit follows our guidelines
  • Unit Tests for the changes have been added (for bug fixes / features)

Other information:
The custom numeric format string mentioned in the bug was not parsed correctly because it contained a plus sign. The IsValidInFormat() function in the MessageTemplateParser did not consider '+' a valid character in format strings.

fix serilog#1353 Custom format string not accepted by the message
template parser.

Custom numeric format strings may contain plus '+' signs.  That
character was not recognised by the parser.
@nblumhardt
Copy link
Member

Thank you, that's great 👍

We might at some point consider any character except for } as being valid in the format string portion, but for now this seems like the lowest-risk fix.

@nblumhardt nblumhardt merged commit 2b13493 into serilog:dev Oct 5, 2019
@nblumhardt nblumhardt mentioned this pull request Oct 12, 2019
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.

Custom format string not accepted by the message template parser
2 participants