More logging fixes

This commit is contained in:
Sean Whalen
2018-10-09 23:28:55 -04:00
parent c944264760
commit d25d01a230
3 changed files with 7 additions and 6 deletions
-1
View File
@@ -1343,7 +1343,6 @@ def get_dmarc_reports_from_inbox(host=None,
forensic_report_msg_uids
number_of_msgs = len(processed_messages)
logger.debug("Deleting messages")
for i in range(number_of_msgs):
msg_uid = processed_messages[i]
logger.debug("Deleting message {0} of {1}: "
+6 -4
View File
@@ -42,8 +42,9 @@ def _main():
if args.hec:
try:
aggregate_reports_ = reports_["aggregate_reports"]
hec_client.save_aggregate_reports_to_splunk(
aggregate_reports_)
if len(aggregate_reports_) > 0:
hec_client.save_aggregate_reports_to_splunk(
aggregate_reports_)
except splunk.SplunkError as e:
logger.error("Splunk HEC error: {0}".format(e.__str__()))
if args.save_forensic:
@@ -60,8 +61,9 @@ def _main():
if args.hec:
try:
forensic_reports_ = reports_["forensic_reports"]
hec_client.save_forensic_reports_to_splunk(
forensic_reports_)
if len(forensic_reports_) > 0:
hec_client.save_forensic_reports_to_splunk(
forensic_reports_)
except splunk.SplunkError as e:
logger.error("Splunk HEC error: {0}".format(e.__str__()))
+1 -1
View File
@@ -182,7 +182,7 @@ def create_indexes(names=None, settings=None):
settings (dict): Index settings
"""
logger.debug("Creating elasticsearch indexes")
logger.debug("Creating Elasticsearch indexes")
if names is None:
names = ["dmarc_aggregate", "dmarc_forensic"]
for name in names: