Skip to content

Commit

Permalink
update logging functions docstring
Browse files Browse the repository at this point in the history
Signed-off-by: Shaanjot Gill <gill.shaanjots@gmail.com>
  • Loading branch information
shaangill025 committed Aug 29, 2023
1 parent f9b945b commit d678ad4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions aries_cloudagent/config/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,18 @@ def configure_per_tenant(
log_json_fmt: bool = False,
):
"""
Configure logger.
Configure logger with time rotated file and stream log handlers.
:param logging_config_path: str: (Default value = None) Optional path to
custom logging config
:param log_level: str: (Default value = None)
:param log_file: str: (Default value = None)
:param log_interval: int: (Default value = None)
:param log_bak_count: int: (Default value = None)
:param log_at_when: str: (Default value = None)
:param log_fmt_pattern: str: (Default value = None)
:param log_json_fmt: bool: (Default value = None)
"""
if logging_config_path is not None:
config_path = logging_config_path
Expand Down Expand Up @@ -556,7 +562,7 @@ def get_log_file_handlers(
log_bak_count: int = None,
log_at_when: str = None,
) -> Tuple[TimedRotatingFileMultiProcessHandler, logging.StreamHandler]:
"""Get TimedRotatingFileMultiProcessHandler log handler."""
"""Get TimedRotatingFileMultiProcessHandler and StreamHandler."""
file_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)).replace(
"aries_cloudagent/config", ""
Expand All @@ -578,7 +584,7 @@ def get_adapted_logger_inst(
log_file: str = None,
wallet_id: str = None,
) -> logging.Logger:
"""Get adapted logger instance, if applicable."""
"""Get adapted logger, formatted with wallet_id if applicable."""
_logger = None
if log_file and wallet_id:
_logger = logging.LoggerAdapter(logger, {"wallet_id": wallet_id})
Expand Down

0 comments on commit d678ad4

Please sign in to comment.