Odoo Help


Why isn't logging working?

Michael Scorpio
on 10/25/15, 3:55 PM 1,915 views

I'm trying to log sql events to the ir_logging table. My config is as follows;

log_db = True
log_db_level = warning
log_handler = :INFO
log_level = debug_sql
logfile = /var/log/odoo/odoo-server.log
logrotate = False

I've also tried "info" for the log_db_level parameter and restarted the odoo service before each test. I've created sales orders and performed stock moves, but had zero rows written to the ir_logging table. I can't find this properly documented anywhere. How does it work?


Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 10/25/15, 5:06 PM


--log-db <dbname>

logs to the ir.logging model (ir_logging table) of the specified database. The database can be the name of a database in the "current" PostgreSQL, or a PostgreSQL URI for e.g. log aggregation

Is your database named 'True' ?

Ray Carnes
on 10/25/15, 5:06 PM
Michael Scorpio
On 10/26/15, 5:30 AM

@Ray; thanks, the only documentation I could find (http://www.mindissoftware.com/2014/09/07/Odoo-logging-configuration-usage-implementation/) had log_db as True and given that is was originally False in my config, this sounded reasonable. I've changed it to the name of my database, and I'm getting some logging, but not logging of SQL statements. Tried a number of things including setting the log_handler = openerp.sql_db:DEBUG. Still no SQL logging.

I have always used "log_level = debug_sql"

Ray Carnes
on 10/26/15, 11:07 PM



| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 10/26/15, 4:39 AM

also.. try this setting :

log_level  = :DEBUG

will output more log messages...

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/25/15, 3:55 PM
Seen: 1915 times
Last updated: 10/26/15, 5:30 AM