From de4ae94b48775f50fb227b024a3fe41ff3a6fcd0 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Sun, 12 Mar 2017 12:42:52 -0400 Subject: [PATCH] emit rapidfire cache info only when debug >= 3 --- bin/weewx/restx.py | 8 +++++--- docs/changes.txt | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/weewx/restx.py b/bin/weewx/restx.py index 88261d87..dfd16da8 100644 --- a/bin/weewx/restx.py +++ b/bin/weewx/restx.py @@ -569,10 +569,12 @@ class StdWunderground(StdRESTful): def new_loop_packet(self, event): """Puts new LOOP packets in the loop queue""" - syslog.syslog(syslog.LOG_DEBUG, "restx: raw packet: %s" % event.packet) + if weewx.debug >= 3: + syslog.syslog(syslog.LOG_DEBUG, "restx: raw packet: %s" % event.packet) self.cached_values.update(event.packet, event.packet['dateTime']) - syslog.syslog(syslog.LOG_DEBUG, "restx: cached packet: %s" % - self.cached_values.get_packet(event.packet['dateTime'])) + if weewx.debug >= 3: + syslog.syslog(syslog.LOG_DEBUG, "restx: cached packet: %s" % + self.cached_values.get_packet(event.packet['dateTime'])) self.loop_queue.put( self.cached_values.get_packet(event.packet['dateTime'])) diff --git a/docs/changes.txt b/docs/changes.txt index f4bdd456..d0bbd1e3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,6 +5,8 @@ weewx change history Fixed log syntax in wmr100 and wmr9x8 drivers. +Emit rapidfire cache info only when debug is level 3 or higher. + 3.7.0 03/11/2017 The tag $current now uses the record included in the event NEW_ARCHIVE_RECORD,