|
@ -145,7 +145,7 @@ class LogzioSender: |
|
|
should_backup_to_disk = False |
|
|
should_backup_to_disk = False |
|
|
break |
|
|
break |
|
|
except Exception as e: |
|
|
except Exception as e: |
|
|
self.logger.error( |
|
|
|
|
|
|
|
|
self.logger.warning( |
|
|
'Got exception while sending logs to Logz.io, ' |
|
|
'Got exception while sending logs to Logz.io, ' |
|
|
'Try (%s/%s). Message: %s', |
|
|
'Try (%s/%s). Message: %s', |
|
|
current_try + 1, number_of_retries, e) |
|
|
current_try + 1, number_of_retries, e) |
|
@ -157,7 +157,7 @@ class LogzioSender: |
|
|
|
|
|
|
|
|
if should_backup_to_disk and self.backup_logs: |
|
|
if should_backup_to_disk and self.backup_logs: |
|
|
# Write to file |
|
|
# Write to file |
|
|
self.logger.info( |
|
|
|
|
|
|
|
|
self.logger.error( |
|
|
'Could not send logs to Logz.io after %s tries, ' |
|
|
'Could not send logs to Logz.io after %s tries, ' |
|
|
'backing up to local file system', number_of_retries) |
|
|
'backing up to local file system', number_of_retries) |
|
|
backup_logs(logs_list, self.logger) |
|
|
backup_logs(logs_list, self.logger) |
|
|