File: hello.py

package info (click to toggle)
ust 2.9.0-2%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,812 kB
  • sloc: ansic: 28,200; sh: 12,314; java: 1,776; makefile: 1,155; python: 687; cpp: 177
file content (24 lines) | stat: -rw-r--r-- 556 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import lttngust
import logging
import time
import math


def hello():
    logger = logging.getLogger('hello-logger')

    while True:
        logger.debug('hello, debug message: %d', 23)
        time.sleep(0.1)
        logger.info('hello, info message: %s', 'world')
        time.sleep(0.1)
        logger.warn('hello, warn message')
        time.sleep(0.1)
        logger.error('hello, error message: %f', math.pi)
        time.sleep(0.1)
        logger.critical('hello, critical message')
        time.sleep(0.5)


if __name__ == '__main__':
    hello()