Skip to content

Commit b81c6be

Browse files
authored
Patch: resolves logging import PR #3
Fix logging import. Resolves #3
2 parents 44f744d + ed6a2d9 commit b81c6be

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

python/aws_lambda_powertools/logging/logger.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
from distutils.util import strtobool
66
from typing import Any, Callable, Dict
77

8-
import aws_lambda_logging
9-
8+
from . import aws_lambda_logging
109
from ..helper.models import MetricUnit, build_lambda_context_model, build_metric_unit_from_str
1110

1211
logger = logging.getLogger(__name__)

python/tests/functional/test_aws_lambda_logging.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,4 @@ class X:
112112

113113
log_dict = json.loads(stdout.getvalue())
114114

115-
assert log_dict["message"]["x"].startswith("<")
116-
117-
118-
def test_wrap():
119-
from aws_lambda_logging import wrap
120-
121-
@wrap
122-
def handler(event, context):
123-
pass
124-
125-
handler(None, None)
126-
127-
128-
def test_wrap_when_request_id_is_in_event():
129-
from aws_lambda_logging import wrap
130-
131-
@wrap
132-
def handler(event, context):
133-
pass
134-
135-
event = {"requestContext": {"requestId": "c19e27e6-230b-11e8-ba47-a95ceb1c6480"}}
136-
handler(event, None)
115+
assert log_dict["message"]["x"].startswith("<")

0 commit comments

Comments
 (0)