mirror of
https://github.com/sprockets/sprockets.logging.git
synced 2024-12-28 11:24:10 +00:00
Update the docs
This commit is contained in:
parent
6a0dd8a61f
commit
467bd5d0f7
3 changed files with 27 additions and 13 deletions
|
@ -13,7 +13,8 @@ templates_path = []
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = 'sprockets.logging'
|
project = 'sprockets.logging'
|
||||||
copyright = '2015, Dave Shawley'
|
author = 'Dave Shawley'
|
||||||
|
copyright = '2015, AWeber Communications'
|
||||||
version = '.'.join(__version__.split('.')[0:1])
|
version = '.'.join(__version__.split('.')[0:1])
|
||||||
release = __version__
|
release = __version__
|
||||||
if len(version_info) > 3:
|
if len(version_info) > 3:
|
||||||
|
@ -25,4 +26,5 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
'python': ('https://docs.python.org/', None),
|
'python': ('https://docs.python.org/', None),
|
||||||
'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None),
|
'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None),
|
||||||
|
'tornado': ('http://www.tornadoweb.org/en/stable/', None),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
Version History
|
Version History
|
||||||
===============
|
===============
|
||||||
|
`1.1.0`_ Jun 18, 2015
|
||||||
|
---------------------
|
||||||
|
- Added :class:`sprockets.logging.JSONRequestFormatter`
|
||||||
|
- Added :method:`sprockets.logging.tornado_log_function`
|
||||||
|
- Added convenience constants and methods as a pass through to Python's logging package:
|
||||||
|
- :data:`sprockets.logging.DEBUG` to :data:`logging.DEBUG`
|
||||||
|
- :data:`sprockets.logging.ERROR` to :data:`logging.ERROR`
|
||||||
|
- :data:`sprockets.logging.INFO` to :data:`logging.INFO`
|
||||||
|
- :data:`sprockets.logging.WARN` to :data:`logging.WARN`
|
||||||
|
- :data:`sprockets.logging.WARNING` to :data:`logging.WARNING`
|
||||||
|
- :method:`sprockets.logging.dictConfig` to :method:`logging.config.dictConfig`
|
||||||
|
- :method:`sprockets.logging.getLogger` to :method:`logging.getLogger`
|
||||||
|
|
||||||
`1.0.0`_ Jun 09, 2015
|
`1.0.0`_ Jun 09, 2015
|
||||||
---------------------
|
---------------------
|
||||||
- Added :class:`sprockets.logging.ContextFilter`
|
- Added :class:`sprockets.logging.ContextFilter`
|
||||||
|
|
||||||
|
.. _1.1.0: https://github.com/sprockets/sprockets.logging/compare/1.0.0...1.1.0
|
||||||
.. _1.0.0: https://github.com/sprockets/sprockets.logging/compare/0.0.0...1.0.0
|
.. _1.0.0: https://github.com/sprockets/sprockets.logging/compare/0.0.0...1.0.0
|
||||||
|
|
|
@ -13,31 +13,30 @@ LOG_CONFIG = {
|
||||||
'class': 'logging.StreamHandler',
|
'class': 'logging.StreamHandler',
|
||||||
'stream': 'ext://sys.stdout',
|
'stream': 'ext://sys.stdout',
|
||||||
'formatter': 'simple',
|
'formatter': 'simple',
|
||||||
'filters': ['context'],
|
'filters': ['context']
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
'formatters': {
|
'formatters': {
|
||||||
'simple': {
|
'simple': {
|
||||||
'class': 'logging.Formatter',
|
'()': sprockets.logging.JSONRequestFormatter
|
||||||
'format': '%(levelname)s %(name)s: %(message)s [%(context)s]',
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
'filters': {
|
'filters': {
|
||||||
'context': {
|
'context': {
|
||||||
'()': 'sprockets.logging.ContextFilter',
|
'()': 'sprockets.logging.ContextFilter',
|
||||||
'properties': ['context'],
|
'properties': ['context']
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
'loggers': {
|
'loggers': {
|
||||||
'tornado': {
|
'tornado': {
|
||||||
'level': 'DEBUG',
|
'level': 'DEBUG'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
'root': {
|
'root': {
|
||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'level': 'DEBUG',
|
'level': 'DEBUG'
|
||||||
},
|
},
|
||||||
'incremental': False,
|
'incremental': False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ if __name__ == '__main__':
|
||||||
app = web.Application([
|
app = web.Application([
|
||||||
web.url('/(?P<object_id>\w+)', RequestHandler,
|
web.url('/(?P<object_id>\w+)', RequestHandler,
|
||||||
kwargs={'parent_log': logger}),
|
kwargs={'parent_log': logger}),
|
||||||
])
|
], log_function=sprockets.logging.tornado_log_function)
|
||||||
app.listen(8000)
|
app.listen(8000)
|
||||||
signal.signal(signal.SIGINT, sig_handler)
|
signal.signal(signal.SIGINT, sig_handler)
|
||||||
signal.signal(signal.SIGTERM, sig_handler)
|
signal.signal(signal.SIGTERM, sig_handler)
|
||||||
|
|
Loading…
Reference in a new issue