From e9727b3cb2af71f7ee0cc921d523038d5fa22fc3 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Tue, 9 Apr 2024 03:45:45 +0000 Subject: [PATCH] Add logging to merge.py --- sqlelf/tools/merge.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sqlelf/tools/merge.py b/sqlelf/tools/merge.py index 0831dfe..026d881 100644 --- a/sqlelf/tools/merge.py +++ b/sqlelf/tools/merge.py @@ -1,4 +1,5 @@ import argparse +import logging import os import sys from dataclasses import dataclass, field @@ -30,6 +31,12 @@ def start(args: list[str] = sys.argv[1:], stdin: TextIO = sys.stdin) -> None: args: the command line arguments to parse stdin: the stdin to use if invoking the shell """ + # Setup the logging config + logging.basicConfig( + level=logging.INFO, + format="%(asctime)s %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s", + ) + parser = argparse.ArgumentParser( prog="sqlelf-merge", description="Merge multiple sqlelf SQLITE databases into a single one.",