Commit | Line | Data |
---|---|---|
e1222efe PP |
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() |