From 2011226cac872ca43d42af88e9d396b31f21df48 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Fri, 6 Sep 2019 10:00:21 +0200 Subject: [PATCH] improved warning logging --- pyfan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfan.py b/pyfan.py index 566cd9b..65f565d 100644 --- a/pyfan.py +++ b/pyfan.py @@ -58,7 +58,8 @@ class ThermalZone: else: write_sysfs(target_fan, int(val)) except OSError as err: - logging.getLogger("pyfan").warning("Failed to set pwm, trying to reset it. (%s)" % err.strerror) + logging.getLogger("pyfan").warning("[%s] Failed to set pwm, trying to reset it. (%s)" % self.name, + err.strerror) self.setup_pwm(1) p, i, d = self.pid.components