diff options
author | 2022-02-23 00:59:09 +0000 | |
---|---|---|
committer | 2022-02-24 17:32:48 +0000 | |
commit | aa2f9685c29d46a2666654c545d4461763c903b6 (patch) | |
tree | 20680504d6049f1f306e06fbb37f99293e8e78f2 /botcore/utils/loggers.py | |
parent | Breaking change notice due to regex move (diff) |
Alter docstrings to look better in autodocs
Diffstat (limited to 'botcore/utils/loggers.py')
-rw-r--r-- | botcore/utils/loggers.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/botcore/utils/loggers.py b/botcore/utils/loggers.py index ac1db920..740c20d4 100644 --- a/botcore/utils/loggers.py +++ b/botcore/utils/loggers.py @@ -1,4 +1,4 @@ -"""Custom logging class.""" +"""Custom :obj:`logging.Logger` class that implements a new ``"TRACE"`` level.""" import logging import typing @@ -12,11 +12,11 @@ TRACE_LEVEL = 5 class CustomLogger(LoggerClass): - """Custom implementation of the `Logger` class with an added `trace` method.""" + """Custom implementation of the :obj:`logging.Logger` class with an added :obj:`trace` method.""" def trace(self, msg: str, *args, **kwargs) -> None: """ - Log 'msg % args' with severity 'TRACE'. + Log the given message with the severity ``"TRACE"``. To pass exception information, use the keyword argument exc_info with a true value: @@ -34,12 +34,12 @@ class CustomLogger(LoggerClass): def get_logger(name: typing.Optional[str] = None) -> CustomLogger: """ - Utility to make mypy recognise that logger is of type `CustomLogger`. + Utility to make mypy recognise that logger is of type :obj:`CustomLogger`. Args: name: The name given to the logger. Returns: - An instance of the `CustomLogger` class. + An instance of the :obj:`CustomLogger` class. """ return typing.cast(CustomLogger, logging.getLogger(name)) |