You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
357 B
Python
20 lines
357 B
Python
2 years ago
|
"""
|
||
|
a logging object
|
||
|
"""
|
||
|
|
||
|
import logging
|
||
|
import sys
|
||
|
|
||
|
class _Log:
|
||
|
def __init__(self):
|
||
|
logging.basicConfig(level=logging.INFO, format='')
|
||
|
self._target = logging.getLogger()
|
||
|
|
||
|
def __getattr__(self, name):
|
||
|
return getattr(self._target, name)
|
||
|
|
||
|
def __dir__(self):
|
||
|
return dir(self._target)
|
||
|
|
||
|
sys.modules[__name__] = _Log()
|