From: Jason Ish Date: Tue, 30 Oct 2018 19:54:36 +0000 (-0600) Subject: logging: better log message when a new file is identified X-Git-Tag: 1.0.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bfd5b167f173488065f47878fe7eb89ee611e9d;p=thirdparty%2Fsuricata-update.git logging: better log message when a new file is identified instead of saying "recording with hash ''" where the hash is empty, log that a new file is being recorded No functional change outside of the log message. --- diff --git a/suricata/update/main.py b/suricata/update/main.py index d9b3728..8c1c929 100644 --- a/suricata/update/main.py +++ b/suricata/update/main.py @@ -785,7 +785,11 @@ class FileTracker: def add(self, filename): checksum = self.md5(filename) - logger.debug("Recording file %s with hash '%s'.", filename, checksum) + if not checksum: + logger.debug("Recording new file %s" % (filename)) + else: + logger.debug("Recording existing file %s with hash '%s'.", + filename, checksum) self.hashes[filename] = checksum def md5(self, filename):