3
2
forked from Dniel97/artemis

add logging levels for index.py and read.py

This commit is contained in:
Hay1tsme 2023-02-24 14:10:41 -05:00
parent c213926893
commit bd1665a849
2 changed files with 6 additions and 5 deletions

View File

@ -105,9 +105,9 @@ if __name__ == "__main__":
logger.addHandler(fileHandler)
logger.addHandler(consoleHandler)
# TODO: Add log level for core to config
logger.setLevel(cfg.allnet.loglevel)
coloredlogs.install(level=cfg.allnet.loglevel, logger=logger, fmt=log_fmt_str)
log_lv = logging.DEBUG if cfg.server.is_develop else logging.INFO
logger.setLevel(log_lv)
coloredlogs.install(level=log_lv, logger=logger, fmt=log_fmt_str)
logger.initialized = True
if not path.exists(cfg.server.log_dir):

View File

@ -94,8 +94,9 @@ if __name__ == "__main__":
logger.addHandler(fileHandler)
logger.addHandler(consoleHandler)
logger.setLevel(logging.INFO)
coloredlogs.install(level=logging.INFO, logger=logger, fmt=log_fmt_str)
log_lv = logging.DEBUG if config.server.is_develop else logging.INFO
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:
logger.error("Game or version not specified")