Repository: incubator-senssoft-userale-pyqt5 Updated Branches: refs/heads/master 0d0ea60b3 -> 800793a3a
SENSSOFT-120 #Fixed bug in logging. Should not interfere with other applications logging handler. Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-userale-pyqt5/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-userale-pyqt5/commit/800793a3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-userale-pyqt5/tree/800793a3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-userale-pyqt5/diff/800793a3 Branch: refs/heads/master Commit: 800793a3a50af0bdbcdfb167e6d8ad38413f86a7 Parents: 0d0ea60 Author: mooshu1x2 <mbe...@draper.com> Authored: Fri Oct 14 14:54:12 2016 -0400 Committer: mooshu1x2 <mbe...@draper.com> Committed: Fri Oct 14 14:54:12 2016 -0400 ---------------------------------------------------------------------- userale/ale.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-senssoft-userale-pyqt5/blob/800793a3/userale/ale.py ---------------------------------------------------------------------- diff --git a/userale/ale.py b/userale/ale.py index 1dbcb3e..b196e4b 100644 --- a/userale/ale.py +++ b/userale/ale.py @@ -85,10 +85,11 @@ class Ale (QObject): self.shutoff = shutoff # Configure logging - self.logger = logging - self.logger.basicConfig(level=logging.INFO, - filename=self.output, - format='%(message)s') + self.logger = logging.getLogger ('userale') + self.logger.propagate = False + self.logger.setLevel (logging.INFO) + handler = logging.FileHandler (self.output) + self.logger.addHandler (handler) # Mapping of all events to methods self.map = { @@ -161,11 +162,13 @@ class Ale (QObject): # Filter data to higher or lower priority list if data is not None: + print (_(data)) if self.resolution > 0 and t in self.hfreq and t in self.map: # data is in watched list and is a high frequency log self.hlogs.append (data) else: self.logs.append (data) + return super (Ale, self).eventFilter (object, event) def cleanup (self):