How-To Guides
View Logs & Debug

View Logs & Debug

Find and fix issues by checking your environment logs.


Access Logs

  1. Open your environment
  2. Go to Logs tab
  3. Logs stream in real-time

Log Types

Odoo Logs

The main application logs showing:

  • Requests and responses
  • Errors and warnings
  • Module loading
  • Database queries (if debug enabled)

PostgreSQL Logs

Database logs showing:

  • Query errors
  • Connection issues
  • Slow queries
  • Replication status (if replica enabled)

Deployment Logs

Build and deploy logs showing:

  • Git operations
  • Container builds
  • Startup sequence
  • Health checks

Reading Log Levels

LevelMeaningAction
INFONormal operationNo action needed
WARNINGSomething unusualMonitor, may need attention
ERRORSomething failedInvestigate and fix
CRITICALSerious failureImmediate attention

Common Error Patterns

Module Import Error

ImportError: No module named 'custom_addon'

Fix: Check that addon is in your Git repo and addons_path is correct.

Database Connection Error

psycopg2.OperationalError: could not connect to server

Fix:

  1. Check PostgreSQL container is running
  2. Verify database credentials
  3. Restart the environment

Permission Denied

PermissionError: [Errno 13] Permission denied: '/var/lib/odoo/filestore'

Fix: File ownership issue. Contact support or use terminal to fix permissions.

Memory Error

MemoryError: Unable to allocate memory

Fix: Scale up RAM for your environment.


Filter Logs

By Text

  1. Use the search box
  2. Type your filter (e.g., ERROR or sale.order)
  3. Only matching lines appear

By Time

  1. Click the time range selector
  2. Choose: Last hour, Last 24h, Last 7 days
  3. Or set custom range

By Container

  1. Click the container dropdown
  2. Select: Odoo, PostgreSQL, or All

Download Logs

For offline analysis:

  1. Click Download button
  2. Choose format (text or JSON)
  3. Logs download to your computer

Useful for:

  • Sharing with support
  • Archiving
  • Analysis with log tools

Terminal Debugging

For deeper debugging:

  1. Click Terminal button
  2. Access the Odoo container shell
  3. Common debug commands:
# View live Odoo logs
tail -f /var/log/odoo/odoo.log
 
# Check Odoo process
ps aux | grep odoo
 
# Test database connection
psql -h localhost -U odoo -d your_database
 
# Access Odoo shell
odoo shell -d your_database
 
# Check disk space
df -h
 
# Check memory
free -m

Debug Mode in Odoo

Enable developer mode for more info:

  1. Go to Settings in Odoo
  2. Scroll to Developer Tools
  3. Click Activate developer mode

Now you can:

  • See technical field names
  • Access debug menu
  • View SQL queries

Performance Debugging

Slow Requests

Look for log lines with timing:

INFO ... /web/dataset/call_kw took 5.234s

Anything over 2-3 seconds needs investigation.

Database Queries

Enable query logging:

  1. Set environment variable: ODOO_LOG_LEVEL=debug_sql
  2. Redeploy
  3. Watch for slow queries

Warning: Debug logging is verbose. Disable after debugging.


Deployment Debugging

If deployment fails:

  1. Go to Overview tab
  2. Find the failed deployment
  3. Click to see detailed logs
  4. Look for the first ERROR line

Common deployment issues:

  • Git authentication failed
  • Addon syntax error
  • Database migration failed
  • Container build error

Set Up Alerts

Get notified of errors:

  1. Go to environment SettingsAlerts
  2. Enable error notifications
  3. Set thresholds
  4. Receive alerts via email

Troubleshooting Checklist

When something's wrong:

  1. Check environment status (🟢 Running?)
  2. Look at recent logs for ERRORs
  3. Check deployment logs if just deployed
  4. Verify memory/CPU not maxed
  5. Check disk space
  6. Try restarting
  7. Check recent code changes

What's Next?