]> source.dussan.org Git - sonarqube.git/commitdiff
No-JIRA Code smell fix: Logs are expecting args, but weren't being passed
authorBruno Andrade <bruno@artsman.dev>
Wed, 14 Jun 2023 16:45:29 +0000 (17:45 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 19 Jun 2023 20:03:13 +0000 (20:03 +0000)
server/sonar-ce/src/main/java/org/sonar/ce/taskprocessor/CeProcessingSchedulerImpl.java
server/sonar-db-dao/src/main/java/org/sonar/db/DBSessionsImpl.java
server/sonar-webserver-core/src/main/java/org/sonar/server/qualitygate/ProjectsInWarningDaemon.java
server/sonar-webserver-core/src/main/java/org/sonar/server/telemetry/TelemetryDaemon.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/health/DbConnectionNodeCheck.java

index 58ddbd961d6ef582eb1c31575a79ae3a770782ec..384d78125a25cf6667b14a0f3f78fe9103835bd6 100644 (file)
@@ -111,7 +111,7 @@ public class CeProcessingSchedulerImpl implements CeProcessingScheduler {
     try {
       waitForInProgressWorkersToFinish(350);
     } catch (InterruptedException e) {
-      LOG.debug("Grace period of hard stop has been interrupted: {}", e);
+      LOG.debug("Grace period of hard stop has been interrupted: {}", e.getMessage(), e);
       Thread.currentThread().interrupt();
     }
 
index c4713e4c08f67271ecfe675210c2fda31c34bb6f..7c93366e5236c58a4cc8e63f9ba1309c480f6e32 100644 (file)
@@ -69,7 +69,7 @@ public class DBSessionsImpl implements DBSessions {
         checkState(!((boolean) f.get(sqlSession)), "Autocommit must be false");
       }
     } catch (NoSuchFieldException | IllegalAccessException e) {
-      LOG.debug("Failed to check the autocommit status of SqlSession: {}", e);
+      LOG.debug("Failed to check the autocommit status of SqlSession: {}", e.getMessage(), e);
     }
   }
 
index e44915dca5fc39fa39d0c9306d371401394329b5..709c2dbf1987095f65dcecc56cb7f6c78f8a5383 100644 (file)
@@ -104,7 +104,7 @@ public class ProjectsInWarningDaemon implements Startable {
       try (DbSession dbSession = dbClient.openSession(false)) {
         updateProjectsInWarningInDb(dbSession, nbProjectsInWarning);
       } catch (Exception e) {
-        LOG.error("Error updating number of projects in warning: {}", e);
+        LOG.error("Error updating number of projects in warning: {}", e.getMessage(), e);
       }
       projectsInWarning.update(nbProjectsInWarning);
       if (nbProjectsInWarning == 0L) {
index f94a25eec7149116c2feaf7843214742689db6fd..be82f8841c743200a78fb2dbac2494e0b50d8206 100644 (file)
@@ -114,7 +114,7 @@ public class TelemetryDaemon extends AbstractStoppableScheduledExecutorServiceIm
           updateTelemetryProps(now);
         }
       } catch (Exception e) {
-        LOG.debug("Error while checking SonarQube statistics: {}", e);
+        LOG.debug("Error while checking SonarQube statistics: {}", e.getMessage());
       }
       // do not check at start up to exclude test instance which are not up for a long time
     };
index 99d29518bb9f4014cbb65cf288a600e369d42b74..01cd0178b16457880bac299f14f82953294f0da3 100644 (file)
@@ -50,7 +50,7 @@ public class DbConnectionNodeCheck implements NodeHealthCheck {
     try (DbSession dbSession = dbClient.openSession(false)) {
       return dbSession.getMapper(IsAliveMapper.class).isAlive() == IsAliveMapper.IS_ALIVE_RETURNED_VALUE;
     } catch (RuntimeException e) {
-      LOGGER.trace("DB connection is down: {}", e);
+      LOGGER.trace("DB connection is down: {}", e.getMessage(), e);
       return false;
     }
   }