Skip to content

HHH-19611 demote many DEBUG-level log messages to TRACE #10520

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

Closed
wants to merge 22 commits into from

Conversation

gavinking
Copy link
Member

@gavinking gavinking commented Jul 12, 2025

since Quarkus insists on doing something completely crazy with our INFO level

See https://hibernate.atlassian.net/browse/HHH-19611 for explanation.

[Please describe here what your change is about]


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Jul 12, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [bc0b63e, b02b695, 9c18da9, 2b5299e, 9f6c6d6, fa7dad5, fdcf91d, 0299ac9, 1d31a16, 948bf2d, 9e7e986, e0416b8, 07e8539, 9551111, a23f60d, 25398a4, f372aae, 9f5128d, bd1f595, 99cc7bb, e2ed7b5, d3c7104]

› This message was automatically generated.

@gavinking gavinking force-pushed the prefer-trace branch 3 times, most recently from fc1ea5c to 75409ae Compare July 12, 2025 19:13
if ( log.isDebugEnabled() ) {
log.debugf( "Performing JAXB binding of hbm.xml document : %s", origin.toString() );
if ( log.isTraceEnabled() ) {
log.tracef( "Performing JAXB binding of hbm.xml document: %s", origin.toString() );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
@@ -181,7 +181,7 @@
else {
assert "entity-mappings".equals( rootElementLocalName );
try {
log.debugf( "Performing JAXB binding of orm.xml document : %s", origin.toString() );
log.tracef( "Performing JAXB binding of orm.xml document: %s", origin.toString() );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
log.debugf( "Getting cached data from region [`%s` (%s)] by key [%s]", getRegion().getName(), getAccessType(), key );
final boolean traceEnabled = log.isTraceEnabled();
if ( traceEnabled ) {
log.tracef( "Getting cached data from region [`%s` (%s)] by key [%s]", getRegion().getName(), getAccessType(), key );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
if ( debugEnabled ) {
log.debugf( "Cache miss : region = `%s`, key = `%s`", getRegion().getName(), key );
if ( traceEnabled ) {
log.tracef( "Cache miss : region = `%s`, key = `%s`", getRegion().getName(), key );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
if ( log.isDebugEnabled() ) {
log.debugf( "Locking cache item [region=`%s` (%s)] : `%s` (timeout=%s, version=%s)", getRegion().getName(), getAccessType(), key, timeout, version );
if ( log.isTraceEnabled() ) {
log.tracef( "Locking cache item [region=`%s` (%s)] : `%s` (timeout=%s, version=%s)", getRegion().getName(), getAccessType(), key, timeout, version );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
@@ -205,7 +205,7 @@

protected void handleLockExpiry(SharedSessionContractImplementor session, Object key, Lockable lock) {
L2CACHE_LOGGER.softLockedCacheExpired( getRegion().getName(), key );
log.debugf( "Cached entry expired : %s", key );
log.tracef( "Cached entry expired: %s", key );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
@@ -219,7 +219,7 @@
@Override
public void remove(SharedSessionContractImplementor session, Object key) {
if ( getStorageAccess().getFromCache( key, session ) instanceof SoftLock ) {
log.debugf( "Skipping #remove call in read-write access to maintain SoftLock : %s", key );
log.debugf( "Skipping #remove call in read-write access to maintain SoftLock: %s", key );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
@@ -1015,7 +1015,7 @@
public Object immediateLoad(String entityName, Object id) {
if ( log.isDebugEnabled() ) {
final EntityPersister persister = requireEntityPersister( entityName );
log.debugf( "Initializing proxy: %s", infoString( persister, id, getFactory() ) );
log.tracef( "Initializing proxy: %s", infoString( persister, id, getFactory() ) );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
if ( MULTI_KEY_LOAD_LOGGER.isDebugEnabled() ) {
MULTI_KEY_LOAD_LOGGER.debugf( "Batch fetching entity `%s#%s`", getLoadable().getEntityName(), id );
if ( MULTI_KEY_LOAD_LOGGER.isTraceEnabled() ) {
MULTI_KEY_LOAD_LOGGER.tracef( "Batch fetching entity `%s#%s`", getLoadable().getEntityName(), id );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
Comment on lines +144 to +145
LOG.trace( "Caching collection: "
+ collectionInfoString( collectionDescriptor, collectionInstance, key, session ) );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
@gavinking gavinking force-pushed the prefer-trace branch 2 times, most recently from d5b0f6d to 91a2f1d Compare July 13, 2025 01:02
log.debugf( "Caching data from load [region=`%s` (%s)] : key[%s] -> value[%s]", getRegion().getName(), getAccessType(), key, value );
final boolean traceEnabled = log.isTraceEnabled();
if ( traceEnabled ) {
log.tracef( "Caching data from load [region='%s' (%s)] : key[%s] -> value[%s]", getRegion().getName(), getAccessType(), key, value );

Check failure

Code scanning / CodeQL

Insertion of sensitive information into log files High

This
potentially sensitive information
is written to a log file.
since Quarkus insists on doing something completely crazy with our INFO level
put them all in a single log message
because it results in logging telling us not to do it
at least for now - it was just too verbose
at least for now - it was just too ugly and verbose
// Incredibly verbose logging disabled
// LOG.tracef( "Adding type registration %s -> %s", key, type );

final Type old = typesByName.put( key, type );

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'Type old' is never read.
// Incredibly verbose logging disabled
// LOG.tracef( "Adding type registration %s -> %s", key, type );

final BasicTypeReference<?> old = typeReferencesByName.put( key, type );

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'BasicTypeReference<?> old' is never read.
@gavinking gavinking changed the title demote many DEBUG-level log messages to TRACE HHH-19611 demote many DEBUG-level log messages to TRACE Jul 13, 2025
motivated by work on logging cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant