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

Fixed logging of java.sql.Date #1378

Merged
merged 2 commits into from
Mar 21, 2023
Merged

Fixed logging of java.sql.Date #1378

merged 2 commits into from
Mar 21, 2023

Conversation

Hikarikun92
Copy link
Contributor

Fixed logging of java.sql.Date objects by appending it before Log4J tries to call java.util.Date.toInstant() on it (see #1366).

Checklist

  • Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
  • ./mvnw verify succeeds (if it fails due to code formatting issues reported by Spotless, simply run spotless:apply and retry)
  • Changes contain an entry file in the src/changelog/.2.x.x directory
  • Tests for the changes are provided
  • Commits are signed (optional, but highly recommended)

Copy link

@zucchivan zucchivan left a comment

Choose a reason for hiding this comment

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

LGTM! =)

@ppkarwasz
Copy link
Contributor

@Hikarikun92,

Thank You for your contribution. Can you add some unit tests to prevent regressions?

@garydgregory
Copy link
Member

-1: this PR is missing a unit test.

@Hikarikun92
Copy link
Contributor Author

@ppkarwasz @garydgregory done, tested failing before & working after change. Could you please review it?

Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

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

@Hikarikun92, it look good to me, thanks.

If there will be no objections I'll merge it in a couple of day.

@ppkarwasz ppkarwasz merged commit 4e90fa5 into apache:2.x Mar 21, 2023
@Hikarikun92
Copy link
Contributor Author

@ppkarwasz Thanks for the merge! Just one question, the commit with the unit test is gone... is that normal?

@ppkarwasz
Copy link
Contributor

@Hikarikun92, Ooops,

thanks for noticing, I must have lost them while locally rebasing. If you can push the tests on the 2.x branch of your fork, I'll pick them up later.

@Hikarikun92
Copy link
Contributor Author

@ppkarwasz Done; should I open another PR? 2.x...Hikarikun92:logging-log4j2:2.x

@ppkarwasz
Copy link
Contributor

@Hikarikun92,

Thanks, I merged it: 134f4d5

@Hikarikun92
Copy link
Contributor Author

@ppkarwasz Thanks!

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.

None yet

4 participants