128db519c2f41098fdd475d19af5929ec9953013
Enabling sql logging for a specific section of code is currently a pain in the ass as it requires updating both the cursor and the logger. This utility does that. This CM is *not* thread-safe as it updates and resets the cursor without using CAS or anything, so if cursor 1 gets enabled, then cursor 2, then cursor 1 stops, then cursor 2, cursor 2 will reset the logger to `logging.DEBUG` which cursor 1 had set, rather than the probable `logging.NOTSET` it originally was. Should be possible to fix by e.g. storing the levels in a static stack (and setting whatever gets popped) buuut... the logging is already a bit of a mess when multithreaded so I'm unsure it matters much. Part-of: odoo/odoo#76243
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%