From 9c1ac46989c1f754d8617f1a2cace6b3b2412f74 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 24 Sep 2021 15:18:06 +0200 Subject: [PATCH] Added loglevel override --- RNS/Reticulum.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 50fd370..af759f5 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -78,7 +78,7 @@ class Reticulum: RNS.Transport.exit_handler() RNS.Identity.exit_handler() - def __init__(self,configdir=None): + def __init__(self,configdir=None, loglevel=None): """ Initialises and starts a Reticulum instance. This must be done before any other operations, and Reticulum will not @@ -103,6 +103,8 @@ class Reticulum: self.local_interface_port = 37428 self.share_instance = True + self.requested_loglevel = loglevel + self.is_shared_instance = False self.is_connected_to_shared_instance = False self.is_standalone_instance = False @@ -178,7 +180,7 @@ class Reticulum: if "logging" in self.config: for option in self.config["logging"]: value = self.config["logging"][option] - if option == "loglevel": + if option == "loglevel" and self.requested_loglevel == None: RNS.loglevel = int(value) if RNS.loglevel < 0: RNS.loglevel = 0