log_handler settings in the configuration

Asked by Paulius Sladkevičius @ hbee

Hello,

I tried to pass to OpenERP server --log-handler=werkzeug:WARN parameter, then logging works like it must. But if I add it to configuration file, f.e. log_handler = [':INFO', 'werkzeug:WARN'], server still prints werkzeug INFO logs. Its bug or I'm missing something?

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Dony (Odoo)
Solved:
Last query:
Last reply:
Revision history for this message
Best Olivier Dony (Odoo) (odo-openerp) said :
#1

Hi,

This was caused by a bug related to the peculiar way optparse handles default list values, such as the one we have for log-handler. It is now fixed in 6.1 after revision [1].

Note however that the config file value should be comma-separated just like addons_path, as you cannot define a Python list in the config file, nor provide multiple values for the same key.
As an example your config file could contain:
  log_handler = werkzeug:CRITICAL,openerp.netsvc.rpc.response:DEBUG

You also don't need to pass :INFO in there, as it is automatically prepended by the system.

Thanks for pointing this out!

[1] server 6.1 rev.4151 rev-id: <email address hidden>

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) said :
#2

Thanks Olivier Dony (OpenERP), that solved my question.