Refa: make exception more clear. (#8224)

### What problem does this PR solve?

#8156

### Type of change
- [x] Refactoring
This commit is contained in:
Kevin Hu
2025-06-12 17:53:59 +08:00
committed by GitHub
parent 86a1411b07
commit d36c8d18b1
3 changed files with 210 additions and 121 deletions

View File

@ -77,4 +77,11 @@ def initRootLogger(logfile_basename: str, log_format: str = "%(asctime)-15s %(le
pkg_logger.setLevel(pkg_level)
msg = f"{logfile_basename} log path: {log_path}, log levels: {pkg_levels}"
logger.info(msg)
logger.info(msg)
def log_exception(e, *args):
logging.exception(e)
for a in args:
logging.error(str(a))
raise e