mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-07-05 08:24:18 +00:00
More logging fixes
This commit is contained in:
@@ -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
@@ -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__()))
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user