diff options
author | Doug Hellmann <doug.hellmann@gmail.com> | 2012-04-21 08:01:57 -0700 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@gmail.com> | 2012-04-21 08:01:57 -0700 |
commit | 21b06cd2be7d42a04bad1db1428fb3269ad38fa1 (patch) | |
tree | 57b127493f9b972fe87a0a7321ae9d33dab82518 /demoapp | |
parent | 6f1f61eb340a643b749622dd3aa5165a4efd9f2c (diff) | |
download | cliff-21b06cd2be7d42a04bad1db1428fb3269ad38fa1.tar.gz |
use logging for controlling console output verbosity
Diffstat (limited to 'demoapp')
-rw-r--r-- | demoapp/cliffdemo/simple.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/demoapp/cliffdemo/simple.py b/demoapp/cliffdemo/simple.py index ccfd7ef..f4a16f8 100644 --- a/demoapp/cliffdemo/simple.py +++ b/demoapp/cliffdemo/simple.py @@ -1,3 +1,4 @@ +import logging from cliff.command import Command @@ -5,5 +6,8 @@ from cliff.command import Command class Simple(Command): "A simple command that prints a message." + log = logging.getLogger(__name__) + def run(self, parsed_args): - print 'hi!' + self.log.debug('debugging') + self.log.info('hi!') |