Mercurial > libervia-desktop-kivy
comparison src/logging_setter.py @ 7:5ebe1592a05a
core (logs): forbid kivy to handle stderr itself
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 08 Jul 2016 18:30:28 +0200 |
parents | 85649eca9f9b |
children |
comparison
equal
deleted
inserted
replaced
6:85649eca9f9b | 7:5ebe1592a05a |
---|---|
50 import kivy | 50 import kivy |
51 kivy # to avoid pyflakes warning | 51 kivy # to avoid pyflakes warning |
52 | 52 |
53 # we want to separate kivy logs from other logs | 53 # we want to separate kivy logs from other logs |
54 logging.root = root_logger | 54 logging.root = root_logger |
55 import sys | |
56 from kivy import logger | |
57 sys.stderr = logger.previous_stderr | |
55 | 58 |
56 # we restore original methods | 59 # we restore original methods |
57 kivy_logger.addHandler = ori_addHandler | 60 kivy_logger.addHandler = ori_addHandler |
58 kivy_logger.setLevel = ori_setLevel | 61 kivy_logger.setLevel = ori_setLevel |