swift-drive-audit: pass logger to get_errors

Closes-Bug: #1379767
Change-Id: Ie8ec5e9ffb977ab39aedeb878e6aae9f0b62530b
This commit is contained in:
Filippo Giunchedi 2014-10-10 12:51:50 +01:00
parent 695bb710c4
commit dec9448c87

View File

@ -55,7 +55,7 @@ def get_devices(device_dir, logger):
return devices
def get_errors(error_re, log_file_pattern, minutes):
def get_errors(error_re, log_file_pattern, minutes, logger):
# Assuming log rotation is being used, we need to examine
# recently rotated files in case the rotation occurred
# just before the script is being run - the data we are
@ -174,7 +174,7 @@ if __name__ == '__main__':
recon_errors = {}
for device in devices:
recon_errors[device['mount_point']] = 0
errors = get_errors(error_re, log_file_pattern, minutes)
errors = get_errors(error_re, log_file_pattern, minutes, logger)
logger.debug("Errors found: %s" % str(errors))
unmounts = 0
for kernel_device, count in errors.items():