Debug logs in Odoo 19 provide detailed information about the application's activities during execution, including server processing, errors, SQL queries/methods, module loading, API calls, and overall system performance.
Logs are one of the most valuable resources for developers and administrators as they allow them to see how Odoo operates behind the scenes so that they can troubleshoot and optimize performance.
What Is Odoo 19's Debug Log?
The Odoo debug log contains all the internal logs generated by Odoo as the application runs. These logs contain information related to:
- The execution of server functions
- Stack traces and error messages
- Performance metrics and database queries
- API calls and loading of modules
Why Are Debug Logs Important in Odoo 19?
Debug logs are critical to both development and production support.
Key Benefits of Odoo Debug Logging:
- Error Tracking - Helps identify the root cause of errors and exceptions.
- Performance Monitoring - Makes it easier to locate the cause of slow database queries and long-running processes.
- Debugging of Modules - Useful for understanding the function of custom modules and server actions.
- Security Evaluation - Use to identify suspicious activity (failed logins), as well as abnormal request patterns.
- Monitoring of the System - Provides visibility on how Odoo modules and services work together.
What Information is Present in an Odoo Debug Log?
The Odoo debug log could contain:
- Execution details of server operations
- Method Calls and workflow activity
- Python stack traces and error information
- SQL queries executed against the database
- API requests sent and responses received
- Module installation/loading information
- Activities relating to user logins/accessing data
Example log entry:
2026-03-18 10:15:32,123 INFO db_name odoo.addons.base.models.ir_model: Model loaded successfully
2026-03-18 10:15:33,456 DEBUG db_name odoo.sql_db: query: SELECT * FROM res_users
How to Enable Debug Logs in Odoo 19?
The debug logs feature can be enabled in Odoo 19 in various ways depending on the deployment method.
Method 1: Using Command Line
Run Odoo with debug log level:
./odoo-bin --log-level=debug
Other useful levels:
- info - Default logging level
- debug - Detailed system operations
- debug_sql - Includes SQL queries
- warning - Only warnings
- error - Only errors
- critical - Critical issues only
Method 2: Configure in Odoo Configuration File
Edit your odoo.conf file:
[options]
log_level = debug
logfile = /var/log/odoo/odoo.log
Restart Odoo after making changes.
Method 3: Debug Mode from UI (Developer Mode)
- Go to Settings
- Click Activate Developer Mode
- This enables technical debugging features (not full logs, but helpful for UI debugging)
Types of Debug Logs in Odoo 19:
1. Standard Debug Logs
- General system operations
- Function calls and workflow execution
2026-03-18 10:15:32,123 INFO db_name odoo.addons.base.models.ir_model: Model loaded successfully
2026-03-18 10:15:34,678 INFO db_name odoo.http: HTTP request handled successfully
2026-03-18 10:15:35,901 DEBUG db_name odoo.addons.sale: Processing sale order confirmation
2. SQL Debug Logs
- Shows all database queries
- Enabled using: --log-level=debug_sql
2026-03-18 10:15:33,456 DEBUG db_name odoo.sql_db: query: SELECT * FROM res_users
2026-03-18 10:15:36,112 DEBUG db_name odoo.sql_db: query: INSERT INTO sale_order (name, amount_total) VALUES ('SO001', 500.00)
2026-03-18 10:15:37,250 DEBUG db_name odoo.sql_db: query: UPDATE sale_order SET state='confirmed' WHERE id=42
3. Error Logs
- Captures exceptions and failures
- Useful for troubleshooting crashes
2026-03-18 11:10:45,678 ERROR db_name odoo.http: Exception during request handling
Traceback (most recent call last):
File "/odoo/http.py", line 2040, in _dispatch
result = request.dispatch()
File "/odoo/http.py", line 2200, in dispatch
response = self._call_function(**self.params)
File "/odoo/addons/web/controllers/main.py", line 1350, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/odoo/addons/sale/models/sale_order.py", line 250, in action_confirm
raise ValueError("Invalid order")
ValueError: Invalid order
4. Access Logs
- Tracks user login/logout and actions
2026-03-18 12:01:10,234 INFO db_name odoo.http: 192.168.1.10 - - [18/Mar/2026 12:01:10] "POST /web/session/authenticate HTTP/1.1" 200 - Login successful
2026-03-18 12:02:15,567 INFO db_name odoo.http: 192.168.1.10 - - [18/Mar/2026 12:02:15] "GET /web/dataset/search_read HTTP/1.1" 200 - Fetch records
2026-03-18 12:05:45,890 INFO db_name odoo.http: 192.168.1.10 - - [18/Mar/2026 12:05:45] "POST /web/session/logout HTTP/1.1" 200 - Logout successful
Where to Find Debug Logs in Odoo 19?
Depending on how you set things up, you can find logs in different places:
- Log File
- Example: /var/log/odoo/odoo.log
- Terminal Output
- When running Odoo manually
- Odoo.sh Logs
- Available in the platform dashboard
2026-03-18 10:15:32,123 INFO db_name odoo.addons.base.models.ir_model: Model loaded successfully
2026-03-18 10:15:33,456 DEBUG db_name odoo.sql_db: query: SELECT * FROM res_users
This shows:
- Timestamp
- Log level
- Module
- Message
Best practices for using debug logs:
- Only use debug_sql when necessary
- Avoid using debug in production for a prolonged period of time
- Keep monitoring the log size
- Maintain log rotation
Problems that can be solved by debug logs:
- Errors while installing modules
- API issues
- Business logic errors
- Bottlenecks
- Database problems
In Odoo 19, debug logs are very beneficial for monitoring activities happening behind the scenes in your system. They provide an entirely clear view of how the system operates (including any errors) and offer assistance when resolving errors and developing new functionalities. Developers can quickly identify, fix, improve, and ensure efficient operation of the system by appropriately using log levels and properly managing logs; however, excessive use of debug logging in production environments may incur excess performance costs.
To read more about Overview of Debugging in Odoo 19, refer to our blog Overview of Debugging in Odoo 19.