openerp-scripts: control startup logging level

Bug #1281262 reported by Georges Racinet
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenERP buildout recipe
Fix Committed
Undecided
Unassigned

Bug Description

It is quite common to want by default one's server to start with logs at level INFO, but some scripts at a higher level.
Otherwise, the DB loading phase (session.open) simply clutters the output for not much benefit.

This is especially annoying in case the openerp script is Sphinx, because any log with level WARNING are interpreted as warnings for the documentation build itself. Of course a warning log is something to care about, but issues must be separated.

Same applies to other scripts, such as nosetests or sometimes custom batch processes : DB loading logs are often not the point, even in the latter case, because they are very probably repeated identically in the neighbouring server log.

We could provide a new option for openerp-scripts to that effect.

An example declaration would be :

   sphinx-build=sphinx-build openerp-log-level=ERROR command-line-options=-d

and that would set the level of the 'openerp' logger to ERROR before the database opening. Of course, the actual script may very well reset it afterwards to whatever value is considered appropriate for its processing.

The combination with '-d' is the more interesting, since '-d' is meant for scripts (such as Sphinx) which have no knowledge of OpenERP at all : the loading occurs before the true beginning of the script.

Revision history for this message
Georges Racinet (gracinet) wrote :

Since maturation of 1.9.0 may be a bit long, this one could be a candidate for backport to the 1.8 branch.
Done in trunk to allow for change if there are some suggestions in the near future.

Changed in anybox.recipe.openerp:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.