We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b65b4a commit 0917323Copy full SHA for 0917323
src/SimpleReplay/extract.py
@@ -5,6 +5,8 @@
5
import logging
6
import os
7
import re
8
+import sys
9
+
10
import redshift_connector
11
import threading
12
import time
@@ -850,9 +852,15 @@ def get_s3_audit_logs(
850
852
else:
851
853
curr_index -= 1
854
- logger.debug(
- f'First audit log in start_time range: {audit_objects[curr_index]["Key"].split("/")[-1]}'
855
- )
+ try:
856
+ logger.debug(
857
+ f'First audit log in start_time range: {audit_objects[curr_index]["Key"].split("/")[-1]}'
858
+ )
859
+ except IndexError:
860
+ logger.fatal(f"There was no user activity log available yet.")
861
+ logger.fatal("Make sure audit logging and user activity logging are enabled and await shipment of the logs.")
862
+ sys.exit(1)
863
864
return (connections, logs, databases, last_connections)
865
866
0 commit comments