summaryrefslogtreecommitdiff
path: root/demoapp
diff options
context:
space:
mode:
authorDoug Hellmann <doug.hellmann@gmail.com>2012-04-21 08:01:57 -0700
committerDoug Hellmann <doug.hellmann@gmail.com>2012-04-21 08:01:57 -0700
commit21b06cd2be7d42a04bad1db1428fb3269ad38fa1 (patch)
tree57b127493f9b972fe87a0a7321ae9d33dab82518 /demoapp
parent6f1f61eb340a643b749622dd3aa5165a4efd9f2c (diff)
downloadcliff-21b06cd2be7d42a04bad1db1428fb3269ad38fa1.tar.gz
use logging for controlling console output verbosity
Diffstat (limited to 'demoapp')
-rw-r--r--demoapp/cliffdemo/simple.py6
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!')