-
Notifications
You must be signed in to change notification settings - Fork 0
/
loggers.py
36 lines (22 loc) · 978 Bytes
/
loggers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
from utils import setup_logger
from settings import run_folder
# Set all LOGGER_DISABLE to True to disable logging
# WARNING: the mcts log file gets big quite quickly
LOGGER_DISABLE = {
'main': False,
'memory': False,
'tourney': False,
'mcts': False,
'model': False
}
logger_main = setup_logger('logger_main', run_folder + 'logs/logger_main.log')
logger_main.disable = LOGGER_DISABLE['main']
logger_memory = setup_logger('logger_memory', run_folder + 'logs/logger_memory.log')
logger_memory.disabled = LOGGER_DISABLE['memory']
logger_tourney = setup_logger('logger_tourney', run_folder + 'logs/logger_tourney.log')
logger_tourney.disabled = LOGGER_DISABLE['tourney']
logger_mcts = setup_logger('logger_mcts', run_folder + 'logs/logger_mcts.log')
logger_mcts.disable = LOGGER_DISABLE['mcts']
logger_model = setup_logger('logger_model', run_folder + 'logs/logger_model.log')
logger_model.disabled = LOGGER_DISABLE['model']