Disable hibernation logs for a specific request

Can you turn off log messages for a specific request in Hibernate / EJB 3.0?

Is there a way to override the "hibernate.show_sql" parameter for only one query?

+3
source share
2 answers

From the sleep configuration, I don't think this is possible.

Hibernate gives you two ways to register a query: either by setting the hibernate hibernate.show_sql parameter to true or by setting the org.hibernate.SQL log category to DEBUG. Both methods are independent, and if you use both of these requests, your requests will be recorded twice.

: , jmx- ( jboss, ).
, hibernate apache commons ( hibernate.show_sql, hibernate System.out).

, Logger ( , , ). , Logger.

+3

, .. , SessionFactory .

0

Source: https://habr.com/ru/post/1737479/


All Articles