Hibernate Logging Guide [Video]
It's important to choose the right logging configuration in order to find performance issues during development instead of during production.
Join the DZone community and get the full member experience.Join For Free
Choosing the right logging configuration can make the difference between finding a performance issue during development or suffering from it in production. But it can also create an overhead that slows down your application. You need to decide which information you need and configure your system accordingly.
I, therefore, prefer to use two different configurations:
- A development configuration that logs enough internal information to understand the database interactions, see the number of executed queries, and check the SQL statements.
- A production configuration that logs as few messages as possible and avoids any overhead.
I explain both configurations in more detail in the following video.
Or if you prefer to read, you can find a detailed description of Hibernate's logging configuration and my recommendations for development and production in the Hibernate Logging Guide on my blog.
Opinions expressed by DZone contributors are their own.