Add logger.isDebugEnabled()

Issue gh-15735
This commit is contained in:
Rob Winch 2024-10-02 10:48:28 -05:00
parent c4b60cd080
commit 7738e6c895
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,9 @@ public final class JdbcOneTimeTokenService implements OneTimeTokenService, Dispo
List<SqlParameterValue> parameters = List.of(new SqlParameterValue(Types.TIMESTAMP, Instant.now()));
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters.toArray());
int deletedCount = this.jdbcOperations.update(DELETE_SESSIONS_BY_EXPIRY_TIME_QUERY, pss);
this.logger.debug("Cleaned up " + deletedCount + " expired tokens");
if (logger.isDebugEnabled()) {
this.logger.debug("Cleaned up " + deletedCount + " expired tokens");
}
}
@Override