puppetlabs/puppet — pull request #3367 by joshcooper (2014-12-02 22:34:27+00:00)
Title: (PUP-3624) Don't modify application-level options

The previous fix modified `face_base` so that if --debug/--verbose were
specified, it set the corresponding application-level options, like we
do for other types of applications, and called Application#set_log_level
to do the right thing.

However, faces will automatically take any application-level option and
dispatch it to the face application. And since --debug and --verbose are
global options, the face framework would report it as an unknown option:

puppet module install foo-bar --debug
Unknown options passed: debug

This commit modifies the base Application#set_log_level method to take
an optional set of options. This way face_base can specify the desired
log level without needing to modify the application-level options.
Non-face application continue to work as before.