Browse Source

Add logger.isDebugEnabled()

Issue gh-15735
pull/15875/head
Rob Winch 1 year ago
parent
commit
7738e6c895
  1. 2
      core/src/main/java/org/springframework/security/authentication/ott/JdbcOneTimeTokenService.java

2
core/src/main/java/org/springframework/security/authentication/ott/JdbcOneTimeTokenService.java

@ -193,8 +193,10 @@ public final class JdbcOneTimeTokenService implements OneTimeTokenService, Dispo @@ -193,8 +193,10 @@ 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);
if (logger.isDebugEnabled()) {
this.logger.debug("Cleaned up " + deletedCount + " expired tokens");
}
}
@Override
public void afterPropertiesSet() throws Exception {

Loading…
Cancel
Save