0

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

enter image description here

  • Can I change default Odoo ouput log format to JSON?
  • (or) Overwrite function init_logger() to make it work with deploy env?
NothingCtrl
  • 191
  • 1
  • 11

1 Answers1

3

For anyone have this problem, I have fixed this issue following these steps:

  • In odoo.conf add config: cloud_logging = True
  • Patch file odoo/netsvc.py source here to attaching the Cloud Logging handler to the Python root logger
  • Suppress default log output by config odoo.conf log file: logfile = /var/log/odoo/odoo.log (to avoid duplicate log in Cloud Logging)

cloud logging after patch

Pit
  • 184
  • 11
NothingCtrl
  • 191
  • 1
  • 11