From 177405915072deebff194e5ed20182a641416155 Mon Sep 17 00:00:00 2001 From: Ric Holland Date: Fri, 8 Mar 2013 15:30:51 +0000 Subject: Change morph to reduce loogign of the environment Added function log_dict_diff to identify and record changes in dicts to the debug log This new function was then implemented in app.py to log changes in the environment --- morphlib/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'morphlib/app.py') diff --git a/morphlib/app.py b/morphlib/app.py index 21e18e32..87710ee5 100755 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -395,8 +395,9 @@ class Morph(cliapp.Application): chatty=True) # Log the environment. - for name in kwargs['env']: - logging.debug('environment: %s=%s' % (name, kwargs['env'][name])) + prev = getattr(self, 'prev_env', {}) + morphlib.util.log_dict_diff(kwargs['env'], prev) + self.prev_env = kwargs['env'] # run the command line return cliapp.Application.runcmd(self, argv, *args, **kwargs) -- cgit v1.2.1