← Back to team overview

openerp-india team mailing list archive

[Bug 1027035] Re: [trunk/6.1] Not respecting log_level

 

Hello,

if you see the closely i have explained  --log-handler which can be used together with --log-level, as we are running with various services using log-handler you can target expected log.
Now the piece of code I have given is not in help (--help) and also is is not explanation for the (--log-level). You can find this code snippet over here (which show the default config) : http://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/netsvc.py#L192 
If you use the right log-level combination you can achieve perfect result:
e.g.
--log_level = error it will show all core error log only, while you still see the werkzeug: INFO log as they log-handler by default is info 
While if you use  --log-handler=werkzeug:ERROR only you will see the handler werkzeug ERROR log only but if you use right combination of the log-level options like --log_level = error --log-handler=werkzeug:ERROR. the right log can be logged efficiently.

You have given help for the log level which Cent percent precise, but also have look at the log-handler help which is as follows :
    --log-handler=PREFIX:LEVEL
                        setup a handler at LEVEL for a given PREFIX. An empty
                        PREFIX indicates the root logger. This option can be
                        repeated. Example: "openerp.orm:DEBUG" or
                        "werkzeug:CRITICAL" (default: ":INFO")
Which advance logging engine.
Let me know if I am missing something.
thank you for you understanding.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1027035

Title:
  [trunk/6.1] Not respecting log_level

Status in OpenERP Server:
  Invalid

Bug description:
  Hi,

  I've got in my config file

  ; Log settings
  logfile = /var/log/openerp/openerp-server.log
  syslog = False
  logrotate = True
  log_level = error

  but it still logs info messages in the log file...

  2012-07-20 10:59:58,187 3008 INFO ? werkzeug: 127.0.0.1 - - [20/Jul/2012 10:59:58] "POST /web/dataset/search_read HTTP/1.0" 200 -
  2012-07-20 10:59:58,196 3008 INFO ? werkzeug: 127.0.0.1 - - [20/Jul/2012 10:59:58] "POST /web/dataset/get HTTP/1.0" 200 -
  2012-07-20 11:00:11,686 3008 INFO ? werkzeug: 127.0.0.1 - - [20/Jul/2012 11:00:11] "POST /xmlrpc/object HTTP/1.0" 200 -

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1027035/+subscriptions


References