Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

License: AGPL-3

JSON Logging

This addon allows to output the Odoo logs in JSON.

It also add the possibility to log extra data in json in your log. See documentation of json logger here : https://github.com/madzak/python-json-logger

Example:

_logger.info('My Message', extra={
    'my_extra_key_1': 'value_1',
    'my_extra_key_2': 'value_2'})

The key “extra” is a standard key of logger module so you can add this key and your log will work with or without this module (see documentation here : https://docs.python.org/2/library/logging.html#logging.Logger.debug)

Configuration

The json logging is activated with the environment variable ODOO_LOGGING_JSON set to 1.

In order to have the logs from the start of the server, you should add logging_json in the --load flag or in the server_wide_modules option in the configuration file.

If you want to see the extra keys when you are developping in local but with the odoo logger output and not the JSON output you can add the environment variable ODOO_LOGGING_JSON_DEV set to 1.

Note : ODOO_LOGGING_JSON_DEV and ODOO_LOGGING_JSON should be not set both to 1

Known issues / Roadmap

  • Completed the extraction (in regex) of interesting message to get more metric

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.

Credits

Images

  • Odoo Community Association: Icon.

Contributors

Funders

The development of this module has been financially supported by:

  • Camptocamp

  • Akretion

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.

Metadata

Release files for odoo8-addon-logging-json 8.0.1.0.0.99.dev4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo8-addon-logging-json 8.0.1.0.0.99.dev4
File Interpreter ABI Platform
odoo8_addon_logging_json-8.0.1.0.0.99.dev4-py2-none-any.whl Python 2 none any Details

Release files / odoo8_addon_logging_json-8.0.1.0.0.99.dev4-py2-none-any.whl

Download URL odoo8_addon_logging_json-8.0.1.0.0.99.dev4-py2-none-any.whl
Size 17.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
daf5f758120681b5ff5fdc8715df822472e84df82e734babf4bb775f24f59aa7
BLAKE2b-256 checksum
How to use checksums
32ab2b6fd8f37dc05acd2d3d5e24ec30acf0d61d7947f863b9be12c48734b520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/30.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.3
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page