Reader small image

You're reading from  jOOQ Masterclass

Product typeBook
Published inAug 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781800566897
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Anghel Leonard
Anghel Leonard
author image
Anghel Leonard

Anghel Leonard is a Chief Technology Strategist and independent consultant with 20+ years of experience in the Java ecosystem. In daily work, he is focused on architecting and developing Java distributed applications that empower robust architectures, clean code, and high-performance. Also passionate about coaching, mentoring and technical leadership. He is the author of several books, videos and dozens of articles related to Java technologies.
Read more about Anghel Leonard

Right arrow

jOOQ logging

By default, you'll see the jOOQ logs at the DEBUG level during code generation and during queries/routine execution. For instance, during a regular SELECT execution, jOOQ logs the query SQL string (with and without the bind values), the first 5 records from the fetched result set as a nice formatted table, and the size of the result is set as shown in the following figure:

Figure 19.1 – A default jOOQ log for a SELECT execution

This figure reveals a few important aspects of jOOQ logging. First of all, the jOOQ logger is named org.jooq.tools.LoggerListener and represents an implementation of the ExecuteListener SPI presented in Chapter 18, jOOQ SPI (Providers and Listeners). Under the hood, LoggerListener uses an internal abstraction (org.jooq.tools.JooqLogger) that attempts to interact with any of the famous loggers, sl4j, log4j, or the Java Logging API (java.util.logging). So, if your application uses any of these loggers, jOOQ...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
jOOQ Masterclass
Published in: Aug 2022Publisher: PacktISBN-13: 9781800566897

Author (1)

author image
Anghel Leonard

Anghel Leonard is a Chief Technology Strategist and independent consultant with 20+ years of experience in the Java ecosystem. In daily work, he is focused on architecting and developing Java distributed applications that empower robust architectures, clean code, and high-performance. Also passionate about coaching, mentoring and technical leadership. He is the author of several books, videos and dozens of articles related to Java technologies.
Read more about Anghel Leonard