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 tip about quarkus.log.level on quarkus.hibernate-orm.log.bind-parameters property #16885
Comments
We could improve the warning message with a suggestion / pointers about how to really change the logging level. You think that would make this simpler? Re-labeling the issue as it's not really Hibernate related. cc/ @galderz |
Yes, I think this would make it simpler. Good idea! |
@Sanne AFAICS, this one is build time, couldn't we adjust automatically the log level for this category? Producing a Let me try that this afternoon, I'll get back to you. |
We would also need something similar to |
@gsmet I'm not sure I understand your proposal - you'd want the ORM specific property to override the system logger's configuration? Sounds like a bit confusing |
Was away for a few weeks and this slip. Do you still need my help with this? Yeah, the message you explain what propertie(s) that can be passed in to workaround the issue. |
I was just going to report that After digging in quarkus issues I've realized I need to configure logger like this: quarkus.log.category."org.hibernate.type.descriptor.sql".min-level=TRACE It need to be documented at least unless there is an option to change log level automatically after setting this property. |
@kucharzyk What about you send a PR to improve the guide? |
does this work for unit tests? I do this and it doesn't seem print the params with Quarkus 2.7.5.Final or 2.8.0.CR1:
Also tried adding it to %dev w/o luck |
Have you tried to add |
Post on StackOverflow about this: https://stackoverflow.com/questions/67305893/quarkus-hibernate-orm-log-bind-parameters-dont-work |
It does not work either Do you need some code to reproduce the bug, or is it qualified as proven and just waiting for prioritization / PR? |
What version of Quarkus are you using? Just to clarify, some parameters are build time, so you can't change them on deploy: Here you can read all parameters from Quarkus:
|
@felipewind Thanks for quick response, let me clarify with reproduction source: https://github.com/siudeks/tech-spikes/tree/master/bugrepro_sql_binding_parameters Reproduction steps:
|
Actually, it works a bit different. You don't see
Every parameter that you have in your SQL will appear sequentially (1, 2, 3...) after your SQL. You must count the SQL parameters to realize what |
I created this application how you can enable the Hibernate ORM log binding parameters: Shortly, you add this to your application.properties:
And you will see something like this:
|
@felipewind is working as a charm, thanks for educating me 'missing' parameters are in logs, but below - exactly as you pointed |
So, that's already the case since January 2020.
I'll have a look. |
Description
On the hibernate-orm guide, add the following tip to the
quarkus.hibernate-orm.log.bind-parameters
property:quarkus.log.min-level
to TRACE after changing this property to true.As I've explained in this topic, when we only set the
quarkus.hibernate-orm.log.bind-parameters
to TRUE the following error occurs:Until Quarkus version
1.10.5.Final
this wasn't necessary.But, if you think this is too obvious please forgive me and just close this issue.
Thanks!
The text was updated successfully, but these errors were encountered: