aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/insert_data.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/insert_data.py b/scripts/insert_data.py
index fee2d26..45b6dd5 100644
--- a/scripts/insert_data.py
+++ b/scripts/insert_data.py
@@ -2,6 +2,7 @@
import sys
import string
import random
+import logging
import argparse
from functools import reduce
from typing import Tuple, Iterator
@@ -15,6 +16,12 @@ from quality_control.file_utils import open_file
from qc_app.db_utils import database_connection
from qc_app.check_connections import check_db, check_redis
+# Set up logging
+stderr_handler = logging.StreamHandler(stream=sys.stderr)
+root_logger = logging.getLogger()
+root_logger.addHandler(stderr_handler)
+root_logger.setLevel("WARNING")
+
def random_string(count: int = 10) -> str:
"""Generate a random, alphanumeric string."""
return "".join(random.choices(