| 1 | # SPDX-License-Identifier: MIT |
| 2 | |
| 3 | import lttngust |
| 4 | import logging |
| 5 | import time |
| 6 | import math |
| 7 | |
| 8 | |
| 9 | def hello(): |
| 10 | logger = logging.getLogger('hello-logger') |
| 11 | |
| 12 | while True: |
| 13 | logger.debug('hello, debug message: %d', 23) |
| 14 | time.sleep(0.1) |
| 15 | logger.info('hello, info message: %s', 'world') |
| 16 | time.sleep(0.1) |
| 17 | logger.warn('hello, warn message') |
| 18 | time.sleep(0.1) |
| 19 | logger.error('hello, error message: %f', math.pi) |
| 20 | time.sleep(0.1) |
| 21 | logger.critical('hello, critical message') |
| 22 | time.sleep(0.5) |
| 23 | |
| 24 | |
| 25 | if __name__ == '__main__': |
| 26 | hello() |