From 6f04c3cd7a2b6e3204adb04c5e87f910b94bc874 Mon Sep 17 00:00:00 2001 From: Issung Date: Sat, 19 Aug 2023 11:37:57 +1000 Subject: [PATCH] Reduce logging spam, remove filename generated log and make download/skip file debug --- GChan/ImageLink.cs | 2 -- GChan/Trackers/Thread.cs | 4 ++++ GChan/nlog.config | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/GChan/ImageLink.cs b/GChan/ImageLink.cs index fabba11..9bb47e5 100644 --- a/GChan/ImageLink.cs +++ b/GChan/ImageLink.cs @@ -52,8 +52,6 @@ public string GenerateFilename(ImageFileNameFormat format) _ => throw new ArgumentException("Given value for 'format' is unknown.") }; - logger.Info($"Filename generated: {result}. Length: {result.Length}"); - return result; } diff --git a/GChan/Trackers/Thread.cs b/GChan/Trackers/Thread.cs index 1f2209b..e9d7071 100644 --- a/GChan/Trackers/Thread.cs +++ b/GChan/Trackers/Thread.cs @@ -128,12 +128,16 @@ private void DownloadImages() { if (link.Tim > GreatestSavedFileTim) { +#if DEBUG logger.Debug($"Downloading file {link} because its Tim was greater than {GreatestSavedFileTim}."); +#endif Utils.DownloadToDir(link, SaveTo); } else { +#if DEBUG logger.Debug($"Skipping downloading file {link} because its Tim was less than than {GreatestSavedFileTim}."); +#endif } } }); diff --git a/GChan/nlog.config b/GChan/nlog.config index 7a2c6b3..2001387 100644 --- a/GChan/nlog.config +++ b/GChan/nlog.config @@ -12,6 +12,6 @@ - + \ No newline at end of file