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

chore: improve logging when falling back to DateUtils.parseDate #1152

Conversation

anto-ac
Copy link
Collaborator

@anto-ac anto-ac commented Jul 1, 2020

No description provided.

@anto-ac anto-ac requested review from e-ivaldi and uglyog July 2, 2020 09:40
"""Unable to parse ${valueOf(actual)} with $pattern using java.time.format.DateTimeFormatter.
Attempting to parse using org.apache.commons.lang3.time.DateUtils
to guarantee backwards compatibility with versions < 4.1.1.
"""Failed to parse ${valueOf(actual)} with '$pattern' using java.time.format.DateTimeFormatter.
Copy link
Member

Choose a reason for hiding this comment

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

You can pass the exception to the logger method as well

logger.warn(e) {

@uglyog uglyog merged commit eb4747d into pact-foundation:master Jul 3, 2020
@anto-ac anto-ac deleted the show-exception-message-when-falling-back branch July 3, 2020 06:07
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.

3 participants