fix logging dupe bug
This commit is contained in:
parent
19bb142121
commit
8d732506aa
@ -39,7 +39,7 @@ class Game:
|
||||
# lang_config
|
||||
self.language = tools.config('configs/sys_value/basic_config.json5')
|
||||
self.language = self.language['language']
|
||||
translate.tr.set_language(self.language)
|
||||
tr.set_language(self.language)
|
||||
# logging config
|
||||
log_config = tools.config('configs/logger.json5')
|
||||
file_name = log_config['handlers']['file']['filename']
|
||||
@ -48,7 +48,7 @@ class Game:
|
||||
try:
|
||||
logging.config.dictConfig(log_config)
|
||||
self.logger = logging.getLogger('main')
|
||||
except ValueError:
|
||||
except ValueError: # it should be no 'logs/' folder
|
||||
os.mkdir('logs')
|
||||
logging.config.dictConfig(log_config)
|
||||
self.logger = logging.getLogger('main')
|
||||
|
@ -35,15 +35,15 @@
|
||||
'loggers': {
|
||||
'client': {
|
||||
'level': 'DEBUG',
|
||||
'handlers': ['console', 'file']
|
||||
'handlers': []
|
||||
},
|
||||
'server': {
|
||||
'level': 'DEBUG',
|
||||
'handlers': ['console', 'file']
|
||||
'handlers': []
|
||||
},
|
||||
'main': {
|
||||
'level': 'DEBUG',
|
||||
'handlers': ['console', 'file']
|
||||
'handlers': []
|
||||
}
|
||||
},
|
||||
'root': {
|
||||
|
Loading…
Reference in New Issue
Block a user