|
|
@ -17,7 +17,7 @@ class ControlledLogger: |
|
|
|
if log_dir.endswith('/'): |
|
|
|
if log_dir.endswith('/'): |
|
|
|
log_dir = log_dir[:-1] |
|
|
|
log_dir = log_dir[:-1] |
|
|
|
os.makedirs(log_dir, exist_ok=True) |
|
|
|
os.makedirs(log_dir, exist_ok=True) |
|
|
|
handler = logging.FileHandler(f"{log_dir}/{logger_name}") |
|
|
|
handler = logging.FileHandler(f"{log_dir}/{logger_name}.log") |
|
|
|
handler.setFormatter(logging.Formatter('%(levelname)s - %(message)s')) |
|
|
|
handler.setFormatter(logging.Formatter('%(levelname)s - %(message)s')) |
|
|
|
|
|
|
|
|
|
|
|
self.logger = logging.getLogger(logger_name) |
|
|
|
self.logger = logging.getLogger(logger_name) |
|
|
|