ProjectionQuery

Summary

Logging

ProjectionQuery uses SLF4J and leaves the logging backend and level configuration to the consuming application. Execution logs describe query structure and timing without intentionally including filter values. SQL preview logs generated SQL; Hibernate SQL and bind-parameter logging have separate configuration.

The main execution logs use INFO, DEBUG, and TRACE. Diagnostics may also emit warnings, such as when SQL preview falls back to query execution.


INFO — Execution lifecycle & performance ↑

High-level information about query execution, useful for monitoring and production environments.

Example:

INFO  ProjectionProcessor - Executing ProjectionQuery [from=Customer, to=CustomerName, distinct=false, paging=false]
INFO  ProjectionProcessor - ProjectionQuery executed in 28 ms (1 results)

DEBUG — Query structure & decisions ↑

Provides visibility into how the query was built, using filter counts, sort counts, and paging parameters.

Example:

DEBUG ProjectionTypedQueryBuilder - ProjectionQuery filters summary: 0 specifications, 1 filters
DEBUG ProjectionTypedQueryBuilder - ProjectionQuery orders applied: 0
DEBUG ProjectionTypedQueryBuilder - ProjectionQuery paging applied: first=0, size=10

TRACE — Detailed internal behavior ↑

Low-level, step-by-step details of query construction. Ideal for deep debugging and understanding complex filter logic.

Example:

TRACE ProjectionTypedQueryBuilder - ProjectionQuery filter added: age GREATER_THAN_OR_EQUAL
TRACE ProjectionTypedQueryBuilder - ProjectionQuery filter added: OR (mainCity equal, secondaryCity equal)
TRACE ProjectionTypedQueryBuilder - ProjectionQuery order added: name ASC

⚠️ TRACE logs are intentionally verbose and should be enabled only for troubleshooting.


← Previous: Custom Filter Handlers · ↑ Back to top · Next → Debug