From 0f74b690cac67c597bdde15770387e9283074787 Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Wed, 31 Aug 2022 19:09:04 +0200 Subject: [PATCH] [modules/publicip] add nicer logging --- bumblebee_status/modules/contrib/publicip.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bumblebee_status/modules/contrib/publicip.py b/bumblebee_status/modules/contrib/publicip.py index 7fba374..ecdbb53 100644 --- a/bumblebee_status/modules/contrib/publicip.py +++ b/bumblebee_status/modules/contrib/publicip.py @@ -36,6 +36,9 @@ import core.decorators import util.format import util.location +import logging + +log = logging.getLogger(__name__) class Module(core.module.Module): @@ -140,10 +143,10 @@ class Module(core.module.Module): core.event.trigger("update", [widget.module.id], redraw_only=True) except Exception as ex: widget.set("public_ip", None) - print(ex) + logging.error(str(ex)) def state(self, widget): return widget.get("state", None) -# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 \ No newline at end of file +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4