Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions requestlogger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def format_NCSA_log(status_code, environ, content_length):
# see http://docs.python.org/3/library/string.html#format-string-syntax
FORMAT = '{host} {logname} {user} [{time}] "{request}" '
FORMAT += '{status} {size} "{referer}" "{agent}"'

# make this module work nicely together with wsgi-request-id
val['request_id'] = environ.get('REQUEST_ID', None)
if val['request_id'] is not None:
FORMAT += ' {request_id} '

return FORMAT.format(**val)

@staticmethod
Expand Down
62 changes: 31 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@
except (IOError, ImportError):
LDESC = ''

setup(name='wsgi-request-logger',
version = '0.4.5',
description = 'Apache-like combined logging for WSGI Web Applications',
long_description = LDESC,
author = 'Philipp Klaus',
author_email = '[email protected]',
url = 'https://github.com/pklaus/wsgi-request-logger',
license = 'BSD',
packages = ['requestlogger'],
zip_safe = True,
platforms = 'any',
keywords = 'WSGI Apache-like request logging',
classifiers = [
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Environment :: Web Environment',
'License :: OSI Approved :: BSD License',
'Topic :: System :: Monitoring',
'Topic :: System :: Logging',
'Topic :: Internet :: WWW/HTTP :: Site Management',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
]
)

setup(
name='wsgi-request-logger',
version='0.4.5',
description='Apache-like combined logging for WSGI Web Applications',
long_description=LDESC,
author='Philipp Klaus',
author_email='[email protected]',
url='https://github.com/pklaus/wsgi-request-logger',
license='BSD',
packages=['requestlogger'],
zip_safe=True,
platforms='any',
keywords='WSGI Apache-like request logging',
classifiers=[
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Environment :: Web Environment',
'License :: OSI Approved :: BSD License',
'Topic :: System :: Monitoring',
'Topic :: System :: Logging',
'Topic :: Internet :: WWW/HTTP :: Site Management',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
]
)