There's more...

You can control the logging level of the application from the command line or from the configuration file. There are two main ways of doing this:

  • To control the log level globally, you can use the --log-level command-line options. Refer to Chapter 1, Managing Odoo Server Instances, for more information.
  • To set the log level for a given logger, you can use --log-handler=prefix:level. In this case, the prefix is a piece of the path of the logger name, and the level is DEBUG, INFO, WARNING, ERROR, or CRITICAL. If you omit the prefix, you set the default level for all loggers. For instance, to set the logging level of my_library loggers to DEBUG and keep the default log level for the other add-ons, you can start Odoo as follows:
$ python odoo.py --log-handler=odoo.addons.my_library:DEBUG

It is possible to specify --log-handler multiple times on the command line. You can also configure the log handler in the configuration file of your Odoo instance. In that case, you can use a comma-separated list of prefix:level pairs. For example, the following line is the same configuration for a minimal logging output as before. We maintain the most important messages and the error messages by default, except for messages produced by werkzeug, for which we only want critical messages, and odoo.service.server, for which we keep info-level messages, including server startup notifications:

 log_handler = :ERROR,werkzeug:CRITICAL,odoo.service.server:INFO 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset