Allows better formatted and commented log_handler items in
configuration files: configparser allows multiline values and
interspersed comments (stripping out comment lines), but while it
removes indent it leaves the linebreaks, so e.g.
foo =
bar,
# qux
quux
when parsed and split on "," results in `['\nbar', '\nquux']` which is
obviously an issue for logging (as it assumes the leading `\n` is part
of the logger name proper).
Since log_handler items can be fairly long and are not necessarily
self-descriptive as to *why* they were selected for re-configuration,
allowing one per line & comments is helpful.
Configuring the non-root logger based on --log-level had the
side-effect (unclear whether it was intended or not as none of the
relevant commits really documented the idea) that log-level could
override log handlers being set on the root logger e.g. if
`log_handler = :INFO` is set in the config file, `--log-level=warn` on
the CLI will override it.
This could be replicated by swapping `pseudo_config` and `logconfig`,
*however* it would also make the sub-loggers override
differently (currently on an exact logger match log-handler overrides
log-level).
The ideal fix would likely be to sequence log-level from the
configuration file, log-handler from the configuration file, log-level
from the CLI and log-handler from the CLI. However that doesn't really
work with the current structure.
closesodoo/odoo#41180
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
* root the base.partner.merge wizard's logger in odoo.addons so the
"odoo" logger configuration properly applies to it
* update the default logging configuration to set the root logger
rather than independently set the odoo and werkzeug loggers
closesodoo/odoo#40872
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
DROP CONSTRAINT (even with IF EXISTS is specified) acquires an ACCESS
EXCLUSIVE lock on the table, preventing e.g. inserts in an other
transaction, so ir_logging would systematically deadlock if configured
to the same database and a warning would be triggered during install
or update (if that ran ir.logging's init).
1. hand-roll the "IF EXISTS" bit, to avoid taking an ACCESS EXCLUSIVE
lock on the table if the problematic constraint does not exist and
thus doesn't need to be dropped (which by now should be the vast
majority of cases).
Replacing DROP CONSTRAINT with DISABLE TRIGGER does not fix the
issue as *that* acquires SHARE ROW EXCLUSIVE. While that's less
constraitning than ACCESS EXCLUSIVE, it still conflicts with an
insert's ROW_EXCLUSIVE.
2. add a timeout to the logging INSERT anyway, the deadlock is still
an issue if we're updating a database which does have the
problematic constraint, and we want to preclude the possible
eventual introduction of new deadlocks in the future.
closesodoo/odoo#34243
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This reverts commit c42a130a98
and commit fb7ac56d65.
The runbot is using cross db logging and those commit were breaking the
mechanism. As a result, the master builds logs were empty.
If we update the runbot to use logging_type instead, the other versions
builds will be impacted hence this revert.
closesodoo/odoo#28512
When there is a performance issue, it's sometimes difficult to discover
which request increased the query count or its duration.
With this commit, the query count, the query time and "python and io" time are displayed
in the logs at the end of each werkzeug request line.
Co-authored-by: Christophe Monniez <moc@odoo.com>
4e5119c6e5 didn't account for
`tools.config['workers']` being `None` on windows, resulting in the
entire thing crashing when trying to execute `None > 1` in Python 3.
Fixes#26447
- RML Reports
- Webkit Reports (most part already removed by 13b9982c62)
- LocalService in netsvc.py
- rename attributes like rml_% to report_%
- rename ir.actions.report.xml to ir.actions.report
- allow rendering directly on an ir.actions.report by calling render method
- remove 'controller' report_type
- remove unused res.font stuff
- remove print_report method in models.py (not used)
- restore removed call to pdftotext process in test_reports