Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1085 from mozilla-services/feat/issue-1055
Browse files Browse the repository at this point in the history
feat: use structured logging and log session info out
  • Loading branch information
bbangert authored Nov 29, 2017
2 parents be68dc8 + 1b10e77 commit 5871294
Show file tree
Hide file tree
Showing 10 changed files with 896 additions and 242 deletions.
2 changes: 2 additions & 0 deletions automock/boto.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[default]
endpoint_url = http://localhost:8000

[Boto]
is_secure = False
Expand All @@ -9,3 +10,4 @@ proxy = 127.0.0.1
[DynamoDB]
region=us-east-1
validate_checksums=False
endpoint_url = http://localhost:8000
3 changes: 2 additions & 1 deletion autopush/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
'dynamodb',
config=botocore.config.Config(
region_name=os.getenv("AWS_REGION_NAME", "us-east-1")
)
),
endpoint_url=os.getenv("AWS_LOCAL_DYNAMODB")
)
g_client = g_dynamodb.meta.client

Expand Down
8 changes: 6 additions & 2 deletions autopush/webpush_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,14 @@ def process_message(self, input):
error_msg="Command not found",
)
from pprint import pformat
log.info('command: %r %r' % (pformat(command), input))
log.debug(
'command: {command} {input}',
command=pformat(command),
input=input
)
command_obj = self.deserialize[command](**input)
response = attr.asdict(self.command_dict[command].process(command_obj))
log.info('response: %s' % response)
log.debug('response: {response}', response=response)
return response


Expand Down
Loading

0 comments on commit 5871294

Please sign in to comment.