338df7742cff509799808e38031587348b92894c
[lttng-ust.git] / doc / examples / python / hello.py
1 import lttngust
2 import logging
3 import time
4 import math
5
6
7 def hello():
8 logger = logging.getLogger('hello-logger')
9
10 while True:
11 logger.debug('hello, debug message: %d', 23)
12 time.sleep(0.1)
13 logger.info('hello, info message: %s', 'world')
14 time.sleep(0.1)
15 logger.warn('hello, warn message')
16 time.sleep(0.1)
17 logger.error('hello, error message: %f', math.pi)
18 time.sleep(0.1)
19 logger.critical('hello, critical message')
20 time.sleep(0.5)
21
22
23 if __name__ == '__main__':
24 hello()
This page took 0.028723 seconds and 3 git commands to generate.