Skip to content

Commit dbfd708

Browse files
Adding initial logic + test
1 parent 505eb98 commit dbfd708

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

aws_lambda_powertools/logging/buffer/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import TYPE_CHECKING
44

55
if TYPE_CHECKING:
6-
from aws_lambda_powertools.logging.types import LOG_LEVEL_VALUES
6+
from aws_lambda_powertools.logging.types import LOG_LEVEL_BUFFER_VALUES
77

88

99
class LoggerBufferConfig:
@@ -17,7 +17,7 @@ class LoggerBufferConfig:
1717
def __init__(
1818
self,
1919
max_size: int = 10240,
20-
minimum_log_level: LOG_LEVEL_VALUES = "DEBUG",
20+
minimum_log_level: LOG_LEVEL_BUFFER_VALUES = "DEBUG",
2121
flush_on_error: bool = True,
2222
compress: bool = False,
2323
):

aws_lambda_powertools/logging/logger.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
if TYPE_CHECKING:
4141
from aws_lambda_powertools.logging.buffer.config import LoggerBufferConfig
42-
from aws_lambda_powertools.logging.types import LOG_LEVEL_VALUES
4342
from aws_lambda_powertools.shared.types import AnyCallableT
4443

4544

@@ -205,7 +204,7 @@ class Logger:
205204
def __init__(
206205
self,
207206
service: str | None = None,
208-
level: LOG_LEVEL_VALUES | int | None = None,
207+
level: str | int | None = None,
209208
child: bool = False,
210209
sampling_rate: float | None = None,
211210
stream: IO[str] | None = None,

aws_lambda_powertools/logging/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
if TYPE_CHECKING:
66
from typing_extensions import NotRequired, TypeAlias
77

8-
LOG_LEVEL_VALUES = Literal["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
8+
LOG_LEVEL_BUFFER_VALUES = Literal["DEBUG", "INFO", "WARNING"]
99

1010

1111
class PowertoolsLogRecord(TypedDict):

0 commit comments

Comments
 (0)