moved kvmd to the root

This commit is contained in:
Devaev Maxim
2018-09-26 02:57:24 +03:00
parent f3946f102f
commit 81a5311349
91 changed files with 2 additions and 2 deletions

15
kvmd/logging.py Normal file
View File

@@ -0,0 +1,15 @@
import sys
import logging
# =====
def get_logger(depth: int=1) -> logging.Logger:
frame = sys._getframe(1) # pylint: disable=protected-access
frames = []
while frame:
frames.append(frame)
frame = frame.f_back
if len(frames) - 1 >= depth:
break
name = frames[depth].f_globals["__name__"]
return logging.getLogger(name)