Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
SUBDIRS_LOG4J = java-log4j
endif
+if BUILD_PYTHON_AGENT
+doc_examples_pythondir = ${docdir}/examples/python
+dist_doc_examples_python_DATA = python/hello.py
+endif
+
dist_doc_examples_DATA = README
dist_doc_examples_easy_ust_DATA = easy-ust/Makefile \
--- /dev/null
+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()