コード例 #1
0
    def _change_db_name(cls, rc_data_path: str, old_name: str, new_name: str):
        if old_name == new_name:
            return

        src_path: str = os.path.join(rc_data_path, old_name)
        dst_path: str = os.path.join(rc_data_path, new_name)

        try:
            shutil.move(src_path, dst_path)
            Logger.info(
                tag=IISS_LOG_TAG,
                msg=
                f"Renaming iiss_db_name succeeded: old={old_name} new={new_name}"
            )
        except BaseException as e:
            Logger.error(
                tag=IISS_LOG_TAG,
                msg=
                f"Failed to rename iiss_db_name: old={old_name} new={new_name} "
                f"path={rc_data_path} exception={str(e)}")
コード例 #2
0
 def test_error(self):
     Logger.error(TAG, 'error log')
コード例 #3
0
ファイル: __init__.py プロジェクト: yakkle/icon-rpc-server
def earlgrey_close(func: str, exc: Optional[BaseException]):
    Logger.error(tag="MQ", msg=f"[{func}] connection closed. {exc}")
    os.killpg(0, signal.SIGKILL)