From cc703a3d9dc1938d3d6ca8b938cdd87a0572661c Mon Sep 17 00:00:00 2001 From: Vagisha Sharma Date: Wed, 10 Jun 2026 10:56:38 -0700 Subject: [PATCH] Reduce log noise when a spectrum library file is missing or unreadable. --- .../view/spectrum/LibrarySpectrumMatchGetter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/labkey/targetedms/view/spectrum/LibrarySpectrumMatchGetter.java b/src/org/labkey/targetedms/view/spectrum/LibrarySpectrumMatchGetter.java index cd5e4178a..5d7d6c9ab 100644 --- a/src/org/labkey/targetedms/view/spectrum/LibrarySpectrumMatchGetter.java +++ b/src/org/labkey/targetedms/view/spectrum/LibrarySpectrumMatchGetter.java @@ -114,9 +114,10 @@ private static boolean isLargeSpectrumLibrary(Path libPath) } catch (IOException e) { - // If we cannot stat the file it is missing or unreadable, in which case the - // downstream library read will fail too. - LOG.warn("Could not determine size of spectrum library file " + libPath, e); + // The file is missing or unreadable; the downstream library read would fail too. + // Log a single WARN line and keep the stack trace at DEBUG so frequent hits do not flood the primary log. + LOG.warn("Could not determine size of spectrum library file " + libPath + " (" + e.getClass().getSimpleName() + ")"); + LOG.debug("Could not determine size of spectrum library file " + libPath, e); return false; } }