-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
quarkus.hibernate-orm.statistics can not be set to false if metrics.enabled is true #20666
Comments
/cc @Sanne, @ebullient, @gsmet, @jmartisk, @yrodiere |
What do you mean by "polluting logs", could you clarify that? Thanks for the report :) |
It just means that i don't need the log statement, can't disable it and its spamming the log server :). I will now use the "internal" log filter to remove it. |
|
For my case, this is correct. But is this switch meaningful otherwise? I mean, if you dont want metrics, what is the point of setting this to true if you don't want the log statement? Does it do anything else than generate the log statements (if you don't want the metrics)? |
Collecting Hibernate statistics is useful even without exposing them as metrics, if you want to inspect the statistics programmatically. You can obtain the |
Thanks, i didn't know that. Will you consider adding a switch to disable the statistics log statement? |
Yes, absolutely. Enabling statistics shouldn't imply that it will also log them. And rather than a switch I think we should just disable this but I need to check why this was enabled. |
Ok I don't think it was intentionally enabled - the option I don't think that's a good idea, I'll disable it by default. |
+1. And add a |
I actually don't think this is very useful so let's wait for someone to ask for it before adding more config properties :) |
In that case I think the same change (turn off stats logging by default) should be done in pure Hibernate too :) |
@jmartisk agreed; I'll propose it there - we are less flexible having strict backwards compatibility rules though so this might need to wait a bit more. |
The description of quarkus.hibernate-orm.statistics is not reflecting the reality.
The description here:
quarkus/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfig.java
Line 38 in 0ae0c6c
Does not match the boolean condition:
quarkus/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java
Line 1017 in 0ae0c6c
If hibernateOrmConfig.metricsEnabled is true, then the statistics property is completley ignored.
Therefor setting statistics to false is not disabling statistics.
I think this is wrong and should be changed to be allowed to disable statistics logging even if metrics are enabled and to match the description. This is polluting logs in production environments.
This affects the current master and Quarkus 2.2.3.Final
The text was updated successfully, but these errors were encountered: