style: フォーマット適用とコメント追加
This commit is contained in:
parent
26c4170643
commit
91e92d880b
@ -53,4 +53,4 @@ def logging_sql(logger, sql):
|
||||
logger (logging.Logger): ロガー
|
||||
sql (str): SQL文
|
||||
"""
|
||||
logger.debug(f'\n{"-"*15}\n{textwrap.dedent(sql)[1:-1]}\n{"-"*15}')
|
||||
logger.debug(f'\n{"-"*15}\n{textwrap.dedent(sql)[1:-1]}\n{"-"*15}')
|
||||
|
||||
@ -5,6 +5,6 @@ class BatchConfig:
|
||||
|
||||
@classmethod
|
||||
def get_instance(cls):
|
||||
if cls.__instance == None:
|
||||
if cls.__instance is None:
|
||||
cls.__instance = cls()
|
||||
return cls.__instance
|
||||
|
||||
@ -6,8 +6,16 @@ from src.system_var.environment import LOG_LEVEL
|
||||
for name in ["boto3", "botocore", "s3transfer", "urllib3"]:
|
||||
logging.getLogger(name).setLevel(logging.WARNING)
|
||||
|
||||
# 共通ロガー
|
||||
def get_logger(log_name):
|
||||
|
||||
def get_logger(log_name: str) -> logging.Logger:
|
||||
"""一意のログ出力モジュールを取得します。
|
||||
|
||||
Args:
|
||||
log_name (str): ロガー名
|
||||
|
||||
Returns:
|
||||
_type_: _description_
|
||||
"""
|
||||
logger = logging.getLogger(log_name)
|
||||
level = logging.getLevelName(LOG_LEVEL)
|
||||
if not isinstance(level, int):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user