From f67fdae542a1c59f080a3a4f47b2bba3623865df Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 5 Feb 2019 12:41:31 +0100 Subject: [PATCH] Add logs to AntivirusJob --- app/services/clamav_service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/clamav_service.rb b/app/services/clamav_service.rb index 5b082d5a9..1b6ea0c19 100644 --- a/app/services/clamav_service.rb +++ b/app/services/clamav_service.rb @@ -1,6 +1,7 @@ class ClamavService def self.safe_file?(file_path) if Rails.env.development? + Rails.logger.info("Rails.env = development => fake scan") # FIXME : remove me return true end @@ -8,7 +9,7 @@ class ClamavService client = ClamAV::Client.new response = client.execute(ClamAV::Commands::ScanCommand.new(file_path)) - + Rails.logger.info("ClamAV response for #{file_path} : #{response.first.class.name}") # FIXME : remove me response.first.class != ClamAV::VirusResponse end end