From ef6be4c62bf55afbe2325311c48eec6f6829b32c Mon Sep 17 00:00:00 2001 From: gitgrift <70476213+gitgrift@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:34:39 +0200 Subject: [PATCH 1/2] Set a default logger log level Set the default log level to INFO so that normal users do not see DEBUG level message. Signed-off-by: Patrick Talbert --- argonone/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/argonone/__init__.py b/argonone/__init__.py index 8cd50c8..6f4001e 100644 --- a/argonone/__init__.py +++ b/argonone/__init__.py @@ -31,6 +31,7 @@ dbus.mainloop.glib.threads_init() log = logging.getLogger("argononed") +log.setLevel(logger.INFO) NOTIFY = Enum('NOTIFY', [ ('VALUE_TEMPERATURE', "temperature"), From 52b8735e10a0e19fdcdb03d9a3b53d1e147d7a61 Mon Sep 17 00:00:00 2001 From: gitgrift <70476213+gitgrift@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:36:30 +0200 Subject: [PATCH 2/2] Change the log level for wait_for_button related messages These messages are only useful for debugging purposes and would otherwise result in excessive logging. Change them to DEBUG level. Signed-off-by: Patrick Talbert --- argonone/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/argonone/__init__.py b/argonone/__init__.py index 6f4001e..5021a1f 100644 --- a/argonone/__init__.py +++ b/argonone/__init__.py @@ -279,9 +279,9 @@ def run(self): log.info("Power button monitoring and control thread starting") self._stop_requested = False while not self._stop_requested: - log.info("DBG: calling .wait_for_button") + log.debug("calling .wait_for_button") button_press = self._argon_board.wait_for_button() - log.info("DBG: button_press = %s", button_press) + log.debug("button_press = %s", button_press) # XXX Originally assumed this would serve as an "ACK", # but that is not the case (see comment above) # if button_press is not None: