From edc9001ece09737b1b526530d6939ba90612f455 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Fri, 24 Nov 2023 20:11:26 +0100 Subject: [PATCH] restore db create log --- Website/create_db_restore_log.py | 13 +++++++++++++ Website/restore_log | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 Website/create_db_restore_log.py create mode 100644 Website/restore_log diff --git a/Website/create_db_restore_log.py b/Website/create_db_restore_log.py new file mode 100644 index 0000000..70d441c --- /dev/null +++ b/Website/create_db_restore_log.py @@ -0,0 +1,13 @@ +import sys +filename = sys.argv[1] +db_log = [] + +with open(filename, 'r') as f: + for line in f: + if "db" in line: + db_log.append(line) + +with open("restore_log", "x") as f: + for i in db_log: + f.write(i) + f.close \ No newline at end of file diff --git a/Website/restore_log b/Website/restore_log new file mode 100644 index 0000000..bcfd29d --- /dev/null +++ b/Website/restore_log @@ -0,0 +1,3 @@ +2023-11-24 18:25:46,538 - db - INFO - Website is starting +2023-11-24 18:25:46,547 - db - INFO - Website is starting +2023-11-24 18:26:16,265 - db - INFO - Added user id: 3 name: 0