Logging library.
Go to file
Juan Antonio Osorio Robles 1b012d0fc6 Capture context in its own key for JSON-based formatters
The JSON formatter used to rely on services making their logging calls
and passing the context there. A call it expted would be

    LOG.debug("Some message", context=context)

This would end up in the "extra" section of the logging record. This is
not usually the case, as projects don't always pass the context on that
call. This also applies to the Fluent formatter which is based on the
JSON one.

For the JSON formatter, we already are getting the context from the
record. So lets use that if no context was provided in the record's
'extra' section. Finally, this places the context in its own section,
which is named 'context'.

Closes-Bug: #1730329
Depends-On: I2b245c1665c3587be3c476b803122788d186e5d5
Change-Id: I765dae17d2ecadce1672f16e432e748d5233acf8
2017-11-14 16:31:28 +00:00
doc/source Update the documentation link for doc migration 2017-08-28 16:53:11 +08:00
oslo_log Capture context in its own key for JSON-based formatters 2017-11-14 16:31:28 +00:00
playbooks/legacy/oslo.log-src-grenade-devstack Migrate to Zuul v3 2017-10-12 03:46:50 +00:00
releasenotes Capture context in its own key for JSON-based formatters 2017-11-14 16:31:28 +00:00
tools Add Constraints support 2016-12-20 13:10:56 +11:00
.coveragerc Fix coverage configuration and execution 2015-10-05 17:22:34 -04:00
.gitignore Merge "Add reno for release notes management" 2016-02-18 20:49:12 +00:00
.gitreview exported from oslo-incubator by graduate.sh 2014-08-25 14:42:22 -04:00
.mailmap exported from oslo-incubator by graduate.sh 2014-08-25 14:42:22 -04:00
.testr.conf Move files out of the namespace package 2014-12-17 21:43:41 -05:00
.zuul.yaml Migrate to Zuul v3 2017-10-12 03:46:50 +00:00
CONTRIBUTING.rst Optimize the link address 2017-04-08 22:52:25 +08:00
HACKING.rst Update URLs according to document migration 2017-07-11 22:46:53 +08:00
LICENSE exported from oslo-incubator by graduate.sh 2014-08-25 14:42:22 -04:00
README.rst Update URLs according to document migration 2017-07-11 22:46:53 +08:00
babel.cfg exported from oslo-incubator by graduate.sh 2014-08-25 14:42:22 -04:00
requirements.txt Updated from global requirements 2017-11-03 01:24:36 +00:00
setup.cfg Update URLs according to document migration 2017-07-11 22:46:53 +08:00
setup.py Updated from global requirements 2017-03-03 00:03:04 +00:00
test-requirements.txt Updated from global requirements 2017-09-20 16:23:00 +00:00
tox.ini Remove references to Python 3.4 2017-01-17 10:27:47 -08:00

README.rst

Team and repository tags

image

oslo.log -- Oslo Logging Library

Latest Version

Downloads

The oslo.log (logging) configuration library provides standardized configuration for all openstack projects. It also provides custom formatters, handlers and support for context specific logging (like resource id's etc).