Printing messages and logging 

Sometimes, we just need to inspect the values of some variables or check whether some code blocks are being executed. A Python print statement can do the job perfectly without stopping the execution flow. As we are running the server in a Terminal window, the printed text will be shown in the standard output, but it won't be stored to the server log if it's being written to a file.

The print statement is only being used as a development aid, and should not make its way to final code, ready to be deployed. If you suspect that you need more details about the code execution, use debug level log messages instead.

Adding debug level log messages at sensitive points of our code allow us to investigate issues in a ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.