doc: implement REUSE with SPDX identifiers
[lttng-ust.git] / doc / examples / python / hello.py
1 # SPDX-FileCopyrightText: 2023 EfficiOS, Inc
2 #
3 # SPDX-License-Identifier: MIT
4
5 import lttngust
6 import logging
7 import time
8 import math
9
10
11 def hello():
12 logger = logging.getLogger('hello-logger')
13
14 while True:
15 logger.debug('hello, debug message: %d', 23)
16 time.sleep(0.1)
17 logger.info('hello, info message: %s', 'world')
18 time.sleep(0.1)
19 logger.warn('hello, warn message')
20 time.sleep(0.1)
21 logger.error('hello, error message: %f', math.pi)
22 time.sleep(0.1)
23 logger.critical('hello, critical message')
24 time.sleep(0.5)
25
26
27 if __name__ == '__main__':
28 hello()
This page took 0.02942 seconds and 4 git commands to generate.