diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-05-13 19:10:42 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-05-13 19:10:42 +0100 |
commit | 9cda9656a25c9983fa8666c5d2b7e1544cb3d07b (patch) | |
tree | 1fb3e4128f67cda55870e60d480ab16dee9c0b55 /example.py | |
parent | dd0f867527349d078cd584cc8f1df6cecd07ebd1 (diff) | |
download | cliapp-9cda9656a25c9983fa8666c5d2b7e1544cb3d07b.tar.gz |
Improve default logging format.
Also add a log statement to the example so we can easily test things.
Diffstat (limited to 'example.py')
-rw-r--r-- | example.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -22,6 +22,7 @@ This implements an fgrep-like utility. import cliapp +import logging class ExampleApp(cliapp.Application): @@ -45,6 +46,7 @@ class ExampleApp(cliapp.Application): if pattern in line: self.output.write('%s:%s: %s' % (name, self.lineno, line)) self.matches += 1 + logging.debug('Match: %s line %d' % (name, self.lineno)) app = ExampleApp(version='0.1.2') |