doc: implement REUSE with SPDX identifiers
[lttng-ust.git] / doc / examples / python / hello.py
CommitLineData
53f7d0d7
MJ
1# SPDX-FileCopyrightText: 2023 EfficiOS, Inc
2#
c0c0989a
MJ
3# SPDX-License-Identifier: MIT
4
37258731
PP
5import lttngust
6import logging
7import time
8import math
9
10
11def 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
27if __name__ == '__main__':
28 hello()
This page took 0.029318 seconds and 4 git commands to generate.