saltstack/salt — pull request #14859 by cachedout (2014-08-08 19:11:44+00:00)
Title: Only log/display exceptions in debug mode

This commit stems from the complaints that salt-cloud is too liberal
when displaying stacktraces.

I think this this may stem from a mis-use of the logger.isEnabledFor() method.

The old behaviour was to log/display an exception if the logger
_supports_ debug mode, with no regard to what logging mode the user
actually requested.

This swaps that behaviour out for a check against opts to see which log
level the user has requested.

It's completely possible, of course, that this _was_ the intended behaviour, in which case this PR should be shot into the flaming sun.

cc: @techhat