Skip to content
Advertisement

How to log warning, error and other info in Odoo development? [closed]

Question: I want to log the warning in odoo logs if any warning or error comes up.

Is there any way out of it?

Thanks in advance.

Advertisement

Answer

Please user logger to print the logs in terminal

Try

import logging

logger = logging.getLogger(__name__)

Use like this:-

_logger.debug(” my log in terminal”)

Advertisement