Skip to content

[14.0] base_rest: turn off deprecation logging on demand#336

Merged
OCA-git-bot merged 1 commit intoOCA:14.0from
camptocamp:14-silent-deprecate-log
Feb 27, 2023
Merged

[14.0] base_rest: turn off deprecation logging on demand#336
OCA-git-bot merged 1 commit intoOCA:14.0from
camptocamp:14-silent-deprecate-log

Conversation

@simahawk
Copy link
Copy Markdown
Contributor

@simahawk simahawk commented Feb 27, 2023

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.models.rest_service_registration: 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.'

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.models.rest_service_registration: 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.'
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @lmignon,
some modules you are maintaining are being modified, check this out!

@simahawk
Copy link
Copy Markdown
Contributor Author

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-336-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e9bfe3e into OCA:14.0 Feb 27, 2023
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 93845b2. Thanks a lot for contributing to OCA. ❤️

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