oslo.log/oslo_log
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
..
cmds tail support, log filtering, executable, and splitlines bug fix 2017-01-25 16:43:14 -07:00
fixture Expose fixtures through oslo_log.fixture 2015-01-30 11:37:42 -05:00
locale Imported Translations from Zanata 2016-07-01 06:28:23 +00:00
tests Capture context in its own key for JSON-based formatters 2017-11-14 16:31:28 +00:00
__init__.py Move files out of the namespace package 2014-12-17 21:43:41 -05:00
_i18n.py Update the documentation link 2017-08-23 15:08:41 +08:00
_options.py Add option to use JSON formatter 2017-11-06 18:52:52 +02:00
formatters.py Capture context in its own key for JSON-based formatters 2017-11-14 16:31:28 +00:00
handlers.py Add additional info like python-systemd does 2017-04-19 09:44:19 -05:00
helpers.py Fix bug in log_method_call decorator 2017-05-25 14:43:02 +00:00
log.py Add option to use JSON formatter 2017-11-06 18:52:52 +02:00
rate_limit.py Add a filter to rate limit logs 2016-09-19 15:09:43 +02:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:23 -05:00
versionutils.py Add support for P and Q release names 2016-09-30 02:28:33 -04:00
watchers.py Reduce READ_FREQ and TIMEOUT for watch-file 2016-05-13 02:05:31 -07:00