Skip to content

[FWD][18.0] base_rest: turn off deprecation logging on demand#604

Open
simahawk wants to merge 3 commits into18.0from
18-silent-deprecation-log
Open

[FWD][18.0] base_rest: turn off deprecation logging on demand#604
simahawk wants to merge 3 commits into18.0from
18-silent-deprecation-log

Conversation

@simahawk
Copy link
Copy Markdown
Contributor

Disable logging for deprecation.
You might have big projects, with tons of services with no specific decorator,
that are well tested and very stable and you don't want to touch them.
Especially if you plan already to move to v16.
Since this logging can bloat your CI and your log collecting tools,
here is a way to prevent that and get only a msg at boot.

Once enabled, you'll see this msg in the logs only at start up:

'odoo.addons.base_rest.components.service: REST_API_METHOD_FIX_DECORATOR_DEPRECATE_LOG_DISABLE enabled: implicit service methods are deprecated. Disable this env key and enable debug level to have more details.'

Manual FWD port of #336 as it was fully incompatible.

Disable logging for deprecation.
You might have big projects, with tons of services with no specific decorator,
that are well tested and very stable and you don't want to touch them.
Especially if you plan already to move to v16.
Since this logging can bloat your CI and your log collecting tools,
here is a way to prevent that and get only a msg at boot.

Once enabled, you'll see this msg in the logs only at start up:

'odoo.addons.base_rest.components.service: REST_API_METHOD_FIX_DECORATOR_DEPRECATE_LOG_DISABLE enabled: implicit service methods are deprecated. Disable this env key and enable debug level to have more details.'
@simahawk simahawk force-pushed the 18-silent-deprecation-log branch from 3752220 to 343a277 Compare March 26, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants