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

Deactivate logs from SqlExceptionHelper #13854

Conversation

Postremus
Copy link
Member

This is done to prevent duplicate logs.
SqlExceptionHelper logs the cause and sql state from the given, and all underlying, SQLExceptions. These already appear as part of the original exceptions getMessage().
Related to #13776.

This is mostly done to prevent duplicate logs.
SqlExceptionHelper's logger logs the cause and sql state from the sqlexception, which most often also appear in the getMessage of the sqlexception itself. The applications logger will log them anyway.
@ghost ghost added area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE labels Dec 12, 2020
@gsmet gsmet requested a review from Sanne December 14, 2020 09:18
@gsmet
Copy link
Member

gsmet commented Apr 1, 2021

@Sanne WDYT about this one?

@gsmet
Copy link
Member

gsmet commented Jul 13, 2021

@Sanne @yrodiere could we decide if we want this or not and if not close it? Thanks.

@Sanne
Copy link
Member

Sanne commented Jul 13, 2021

sorry for having missed it. I'm not sure about this, as this removes the SQL Error code which seems rather useful to have.

@Postremus do you have an example stacktrace that highlights what's annoying about this? How comfortable are you that you won't need the extra information this adds?

Finally, if you think this is too noisy, shouldn't we rather improve Hibernate ORM 's logging?

@gavinking
Copy link

Is there also an issue of warnings vs exceptions in this?

IIRC we log SQL warnings instead of just ignoring them.

@gastaldi
Copy link
Contributor

As @Sanne pointed out, this removes the SQL Error code which seems rather useful to have, therefore I'm closing this PR. Thanks!

@gastaldi gastaldi closed this Aug 25, 2021
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants