1
0
mirror of synced 2024-12-01 00:57:16 +01:00

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(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):

View File

@ -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")