uasyncio: Add own set_debug() function.

set_debug() from uasyncio.core doesn't have effect on the main uasyncio
package, so let them both have set_debug() function, and allow to enable
debug logging independently.
pull/188/head
Paul Sokolovsky 2017-06-08 02:51:29 +03:00
rodzic a4b75ab2bf
commit a2097be138
1 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -4,6 +4,17 @@ import usocket as _socket
from uasyncio.core import *
DEBUG = 0
log = None
def set_debug(val):
global DEBUG, log
DEBUG = val
if val:
import logging
log = logging.getLogger("uasyncio")
class PollEventLoop(EventLoop):
def __init__(self, len=42):