Skip to content

refactor(logger): improve typing #3869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions aws_lambda_powertools/logging/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,12 @@ def decorate(event, context, *args, **kwargs):
def info(
self,
msg: object,
*args,
exc_info=None,
*args: object,
exc_info: logging._ExcInfoType = None,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand All @@ -473,12 +473,12 @@ def info(
def error(
self,
msg: object,
*args,
exc_info=None,
*args: object,
exc_info: logging._ExcInfoType = None,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand All @@ -495,12 +495,12 @@ def error(
def exception(
self,
msg: object,
*args,
*args: object,
exc_info: logging._ExcInfoType = True,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand All @@ -517,12 +517,12 @@ def exception(
def critical(
self,
msg: object,
*args,
exc_info=None,
*args: object,
exc_info: logging._ExcInfoType = None,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand All @@ -539,12 +539,12 @@ def critical(
def warning(
self,
msg: object,
*args,
exc_info=None,
*args: object,
exc_info: logging._ExcInfoType = None,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand All @@ -561,12 +561,12 @@ def warning(
def debug(
self,
msg: object,
*args,
exc_info=None,
*args: object,
exc_info: logging._ExcInfoType = None,
stack_info: bool = False,
stacklevel: int = 2,
extra: Optional[Mapping[str, object]] = None,
**kwargs,
**kwargs: object,
) -> None:
extra = extra or {}
extra = {**extra, **kwargs}
Expand Down