Skip to content
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

Run nginx and gunicorn in docker via supervisor #1313

Merged
merged 7 commits into from
Jul 13, 2018
Merged
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
Prev Previous commit
Next Next commit
Fix line length and unused import warnings
  • Loading branch information
c-w committed Jul 10, 2018
commit 8d1b253ff8ff3a7d47753acbe77a95926842523b
7 changes: 3 additions & 4 deletions server/logging/gunicorn.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime
import json
from datetime import datetime
import logging
import os
import traceback
Expand Down Expand Up @@ -83,7 +82,7 @@ def access(self, resp, req, environ, request_time):
status = resp.status
if isinstance(status, str):
status = status.split(None, 1)[0]
now = datetime.datetime.utcnow()
now = datetime.utcnow()

level = logging.NOTSET
message = {
Expand All @@ -105,7 +104,7 @@ def access(self, resp, req, environ, request_time):
message['urlMapEntry'] = request_log.endpoint
message['line'] = [
{
'time': format_time(datetime.datetime.utcfromtimestamp(record.created)),
'time': format_time(datetime.utcfromtimestamp(record.created)),
'severity': record.levelname,
'logMessage': access_formatter.format(record),
# The log viewer only wants real App Engine files, so we
Expand Down