diff --git a/uasyncio.core/uasyncio/core.py b/uasyncio.core/uasyncio/core.py index 580f8c8a..64907ff9 100644 --- a/uasyncio.core/uasyncio/core.py +++ b/uasyncio.core/uasyncio/core.py @@ -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):