Skip to content
Open
Changes from 1 commit
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
Next Next commit
#22 - Improving logging.
  • Loading branch information
unacceptable committed Dec 23, 2023
commit f2bbb3aa1a63e2a4f7f06e45a2783936e3e99402
11 changes: 9 additions & 2 deletions awslambdaric/lambda_runtime_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
"""

import sys
import logging

from awslambdaric import __version__
from .lambda_runtime_exception import FaultException

logging.basicConfig(
format="%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s",
level=logging.INFO,
)

def _user_agent():
py_version = (
Expand All @@ -19,8 +25,9 @@ def _user_agent():
import runtime_client

runtime_client.initialize_client(_user_agent())
except ImportError:
runtime_client = None
except ImportError as import_error:
logging.fatal('Failed to import "runtime_client" module. %s', import_error)
raise import_error

from .lambda_runtime_marshaller import LambdaMarshaller

Expand Down