File size: 335 Bytes
c02bdcd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import logging
from pathlib import Path
class Logger:
def __init__(self, logger=logging.getLogger(Path(__file__).parent.name)):
self.logger = logger
def set_logger(self, logger: logging.Logger):
self.logger = logger
def get_logger(self) -> logging.Logger:
return self.logger
logger = Logger()
|