Skip to content

Commit

Permalink
Reduce logging spam, remove filename generated log and make download/…
Browse files Browse the repository at this point in the history
…skip file debug
  • Loading branch information
Issung committed Aug 19, 2023
1 parent 1920b63 commit 6f04c3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions GChan/ImageLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 4 additions & 0 deletions GChan/Trackers/Thread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion GChan/nlog.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
</targets>

<rules>
<logger name="*" minlevel="Trace" writeTo="console,debugger,file" />
<logger name="*" minlevel="Info" writeTo="console,debugger,file" />
</rules>
</nlog>

0 comments on commit 6f04c3c

Please sign in to comment.