uasyncio.core: Add set_debug() method, don't import logging if not called.

pull/173/head
Paul Sokolovsky 2017-05-01 16:04:28 +03:00
rodzic 0a02e2dfff
commit b2f69eb23b
1 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -3,15 +3,21 @@ try:
except ImportError:
import time
import utimeq
import logging
DEBUG = 0
log = logging.getLogger("asyncio")
type_gen = type((lambda: (yield))())
DEBUG = 0
log = None
def set_debug(val):
global DEBUG, log
DEBUG = val
if val:
import logging
log = logging.getLogger("uasyncio")
class EventLoop:
def __init__(self, len=42):