print-used (W8116)#
print() is used instead of a logger.
What it does#
Reports calls to the built-in print().
Why is this bad?#
Odoo servers run as services: print output is lost or ends up outside the
log, without a timestamp, level or database name.
Example#
print("Synchronising", len(records))
Use instead:
_logger = logging.getLogger(__name__)
_logger.info("Synchronising %s", len(records))