feat: debug log for clean files

This commit is contained in:
Bobby 2022-04-23 05:01:56 +07:00
parent 88d32a6dcf
commit 3d94ae599e
No known key found for this signature in database
GPG Key ID: 941839794CBF5A09

View File

@ -675,6 +675,8 @@ self.assertPassthroughScans = async (req, user, infoMap) => {
} else if (info.data.scan.isInfected === null) { } else if (info.data.scan.isInfected === null) {
logger.log(`[ClamAV]: ${info.data.filename}: Unable to scan`) logger.log(`[ClamAV]: ${info.data.filename}: Unable to scan`)
unableToScan.push(info.data.filename) unableToScan.push(info.data.filename)
} else {
logger.debug(`[ClamAV]: ${info.data.filename}: File is clean`)
} }
} }
} }
@ -722,6 +724,8 @@ self.scanFiles = async (req, user, infoMap) => {
} else if (response.isInfected === null) { } else if (response.isInfected === null) {
logger.log(`[ClamAV]: ${info.data.filename}: Unable to scan`) logger.log(`[ClamAV]: ${info.data.filename}: Unable to scan`)
unableToScan.push(info.data.filename) unableToScan.push(info.data.filename)
} else {
logger.debug(`[ClamAV]: ${info.data.filename}: File is clean`)
} }
})).then(() => { })).then(() => {
if (foundThreats.length) { if (foundThreats.length) {