Move to kernel style SPDX license identifiers
[lttng-ust.git] / doc / examples / python / hello.py
CommitLineData
c0c0989a
MJ
1# SPDX-License-Identifier: MIT
2
37258731
PP
3import lttngust
4import logging
5import time
6import math
7
8
9def 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
25if __name__ == '__main__':
26 hello()
This page took 0.024097 seconds and 4 git commands to generate.