From 9e43640834f0bdd4c52c6b16843ae3c4709a6e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Sun, 26 Feb 2023 15:43:19 +0100 Subject: [PATCH] Change cache log messages to be debug/trace --- .../sourceforge/pmd/cache/AbstractAnalysisCache.java | 10 +++++----- .../net/sourceforge/pmd/cache/FileAnalysisCache.java | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cache/AbstractAnalysisCache.java b/pmd-core/src/main/java/net/sourceforge/pmd/cache/AbstractAnalysisCache.java index 81ae8ab342..a70042753e 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/cache/AbstractAnalysisCache.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/cache/AbstractAnalysisCache.java @@ -74,7 +74,7 @@ public abstract class AbstractAnalysisCache implements AnalysisCache { && cachedResult.getFileChecksum() == document.getCheckSum(); if (upToDate) { - LOG.debug("Incremental Analysis cache HIT"); + LOG.trace("Incremental Analysis cache HIT"); /* * Update cached violation "filename" to match the appropriate text document, @@ -86,7 +86,7 @@ public abstract class AbstractAnalysisCache implements AnalysisCache { // copy results over updatedResult = cachedResult; } else { - LOG.debug("Incremental Analysis cache MISS - {}", + LOG.trace("Incremental Analysis cache MISS - {}", cachedResult != null ? "file changed" : "no previous result found"); // New file being analyzed, create new empty entry @@ -130,7 +130,7 @@ public abstract class AbstractAnalysisCache implements AnalysisCache { boolean cacheIsValid = cacheExists(); if (cacheIsValid && ruleSets.getChecksum() != rulesetChecksum) { - LOG.info("Analysis cache invalidated, rulesets changed."); + LOG.debug("Analysis cache invalidated, rulesets changed."); cacheIsValid = false; } @@ -142,7 +142,7 @@ public abstract class AbstractAnalysisCache implements AnalysisCache { if (cacheIsValid && currentAuxClassPathChecksum != auxClassPathChecksum) { // TODO some rules don't need that (in fact, some languages) - LOG.info("Analysis cache invalidated, auxclasspath changed."); + LOG.debug("Analysis cache invalidated, auxclasspath changed."); cacheIsValid = false; } } else { @@ -151,7 +151,7 @@ public abstract class AbstractAnalysisCache implements AnalysisCache { final long currentExecutionClassPathChecksum = FINGERPRINTER.fingerprint(getClassPathEntries()); if (cacheIsValid && currentExecutionClassPathChecksum != executionClassPathChecksum) { - LOG.info("Analysis cache invalidated, execution classpath changed."); + LOG.debug("Analysis cache invalidated, execution classpath changed."); cacheIsValid = false; } diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cache/FileAnalysisCache.java b/pmd-core/src/main/java/net/sourceforge/pmd/cache/FileAnalysisCache.java index 17325c6ffa..630dbf3093 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/cache/FileAnalysisCache.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/cache/FileAnalysisCache.java @@ -86,9 +86,9 @@ public class FileAnalysisCache extends AbstractAnalysisCache { fileResultsCache.put(filePathId, new AnalysisResult(checksum, violations)); } - LOG.info("Analysis cache loaded"); + LOG.debug("Analysis cache loaded from {}", cacheFile); } else { - LOG.info("Analysis cache invalidated, PMD version changed."); + LOG.debug("Analysis cache invalidated, PMD version changed."); } } catch (final EOFException e) { LOG.warn("Cache file {} is malformed, will not be used for current analysis", cacheFile.getPath()); @@ -141,9 +141,9 @@ public class FileAnalysisCache extends AbstractAnalysisCache { } } if (cacheFileShouldBeCreated) { - LOG.info("Analysis cache created"); + LOG.debug("Analysis cache created"); } else { - LOG.info("Analysis cache updated"); + LOG.debug("Analysis cache updated"); } } catch (final IOException e) { LOG.error("Could not persist analysis cache to file: {}", e.getMessage());