From 01da8270de4fdf6eb9e0ae1c26cbc1a5a8f5b8e8 Mon Sep 17 00:00:00 2001 From: costero-e Date: Fri, 29 Nov 2024 17:44:12 +0100 Subject: [PATCH] fixing duplicate logs --- beacon/logs/logs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beacon/logs/logs.py b/beacon/logs/logs.py index b5f4965..baffe4b 100644 --- a/beacon/logs/logs.py +++ b/beacon/logs/logs.py @@ -20,6 +20,10 @@ sh.setFormatter(formatter) LOG.addHandler(sh) +if len(LOG.handlers) > 0: + # Remove the first handler + LOG.removeHandler(LOG.handlers[0]) + # LOGS per iniciar i parar el contenidor (INFO) # LOGS per he rebut una request i retorno una response (INFO) # Tota la resta per DEBUG