6 parser
= argparse
.ArgumentParser(description
='Python tracing example.')
7 parser
.add_argument('-i', '--iterations', type=int, help='The number of loop iterations', required
=True)
9 args
= parser
.parse_args()
12 def example(iteration
):
13 ch
= logging
.StreamHandler()
14 ch
.setLevel(logging
.DEBUG
)
16 logger
= logging
.getLogger('pello')
19 for i
in range(iteration
):
20 logger
.debug('debug message')
21 logger
.info('info message')
22 logger
.warn('warn message')
23 logger
.error('error message')
24 logger
.critical('critical message')
27 if __name__
== '__main__':
28 example(args
.iterations
)
This page took 0.031169 seconds and 6 git commands to generate.