Score:0

Deploy Odoo on Google Kubernetes: Log severity all in ERROR

de flag

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?
Score:3
de flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.