add logging levels for index.py and read.py
This commit is contained in:
parent
c213926893
commit
bd1665a849
6
index.py
6
index.py
@ -105,9 +105,9 @@ if __name__ == "__main__":
|
|||||||
logger.addHandler(fileHandler)
|
logger.addHandler(fileHandler)
|
||||||
logger.addHandler(consoleHandler)
|
logger.addHandler(consoleHandler)
|
||||||
|
|
||||||
# TODO: Add log level for core to config
|
log_lv = logging.DEBUG if cfg.server.is_develop else logging.INFO
|
||||||
logger.setLevel(cfg.allnet.loglevel)
|
logger.setLevel(log_lv)
|
||||||
coloredlogs.install(level=cfg.allnet.loglevel, logger=logger, fmt=log_fmt_str)
|
coloredlogs.install(level=log_lv, logger=logger, fmt=log_fmt_str)
|
||||||
logger.initialized = True
|
logger.initialized = True
|
||||||
|
|
||||||
if not path.exists(cfg.server.log_dir):
|
if not path.exists(cfg.server.log_dir):
|
||||||
|
5
read.py
5
read.py
@ -94,8 +94,9 @@ if __name__ == "__main__":
|
|||||||
logger.addHandler(fileHandler)
|
logger.addHandler(fileHandler)
|
||||||
logger.addHandler(consoleHandler)
|
logger.addHandler(consoleHandler)
|
||||||
|
|
||||||
logger.setLevel(logging.INFO)
|
log_lv = logging.DEBUG if config.server.is_develop else logging.INFO
|
||||||
coloredlogs.install(level=logging.INFO, logger=logger, fmt=log_fmt_str)
|
logger.setLevel(log_lv)
|
||||||
|
coloredlogs.install(level=log_lv, logger=logger, fmt=log_fmt_str)
|
||||||
|
|
||||||
if args.series is None or args.version is None:
|
if args.series is None or args.version is None:
|
||||||
logger.error("Game or version not specified")
|
logger.error("Game or version not specified")
|
||||||
|
Loading…
Reference in New Issue
Block a user