From 851d9b4b37815a9079e180c85812abafbb5954db Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Tue, 27 Dec 2022 11:44:03 +0100 Subject: [PATCH] Add logging to process_queue --- process_queue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/process_queue b/process_queue index e5147ff..28b73bd 100644 --- a/process_queue +++ b/process_queue @@ -1,11 +1,19 @@ #!/usr/bin/python3 +import logging +import logging.config import os import socket import time from ltsdb_json import LTS +import config + +logging.config.dictConfig(config.logging) +log = logging.getLogger("process_queue") + + node = socket.gethostbyaddr(socket.gethostname())[0] class DiskFullPredictor: @@ -40,6 +48,7 @@ class DiskFullPredictor: if d[1] < current_usable_bytes * 0.1: continue # for sanity if current_used_bytes ** 2 / d[1] > current_usable_bytes: + log.info("d = %s, current_used_bytes = %s, current_usable_bytes = %s", d, current_used_bytes, current_usable_bytes) tuf = now - d[0] break desc = {**lts.description,