enable parsing of gunicorn access logs by AWS

This commit is contained in:
Changaco 2021-05-22 12:07:11 +02:00
parent 04e54b0de5
commit f4120f18b3

4
app.py
View File

@ -16,9 +16,11 @@ if __name__ == '__main__':
program = 'gunicorn'
execlp(program, program, 'liberapay.main:website', '--config', 'app.py', *sys.argv[1:])
accesslog = '-' # stderr
accesslog = '-' # stdout
access_log_format = (
'%(t)s %(s)s %(L)ss %({Host}i)s "%(r)s" %(b)s "%(f)s"'
) if sys.stdin.isatty() else (
'%(s)s %(L)s %({Host}i)s "%(r)s" %(b)s "%(f)s"'
)
if ':' in _canonical_host: