I deploy Odoo 13CE on Googke Kubernetes and using Cloud Logging for logging, I config app using default container log.
Everything run smoothly, except all log output severity mark as ERROR in Cloud Loging
- Can I change default Odoo ouput log format to JSON?
- (or) Overwrite function
init_logger()
to make it work with deploy env?
Best Answer
For anyone have this problem, I have fixed this issue following these steps:
odoo.conf
add config:cloud_logging = True
odoo/netsvc.py
source here to attaching the Cloud Logging handler to the Python root loggerodoo.conf
log file:logfile = /var/log/odoo/odoo.log
(to avoid duplicate log in Cloud Logging)