From 712eed5b376804cd1792577d517f7f56a36b6ba4 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 21 May 2015 09:22:12 -0700 Subject: [PATCH] Only show state transitions to logging when in BLATHER mode To help reduce the amount of log pollution for various consuming projects, disable showing the runtime state transitions when in DEBUG mode and only show them when a lower level BLATHER mode is active instead. Change-Id: I218a380294f9b6e06cb0740bdb3a2a7ea0473299 --- taskflow/engines/action_engine/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskflow/engines/action_engine/runner.py b/taskflow/engines/action_engine/runner.py index f1f880ce..d50de157 100644 --- a/taskflow/engines/action_engine/runner.py +++ b/taskflow/engines/action_engine/runner.py @@ -204,10 +204,10 @@ class _MachineBuilder(object): LOG.debug("Entering new state '%s' in response to event '%s'", new_state, event) - # NOTE(harlowja): when ran in debugging mode it is quite useful + # NOTE(harlowja): when ran in blather mode it is quite useful # to track the various state transitions as they happen... watchers = {} - if LOG.isEnabledFor(logging.DEBUG): + if LOG.isEnabledFor(logging.BLATHER): watchers['on_exit'] = on_exit watchers['on_enter'] = on_enter