{"id":645,"date":"2020-09-14T17:56:35","date_gmt":"2020-09-14T11:56:35","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=645"},"modified":"2020-09-14T17:56:35","modified_gmt":"2020-09-14T11:56:35","slug":"how-to-enable-logging-in-odoo","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/how-to-enable-logging-in-odoo.html","title":{"rendered":"How to Enable Logging in Odoo"},"content":{"rendered":"\n<p>There are two ways to see the Odoo Logs. One is rough and can be used to see the latest Odoo logs, it&#8217;s the Journal tools. You may do this using the following if your Odoo service is installed as odoo13 for example<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">journalctl -u odoo13<\/pre>\n\n\n\n<p>Note: If you are having trouble primarily in installing Odoo properly, you may check the following:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"tCeyzXrYrI\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-install-odoo-13-in-centos-7.html\">How to Install Odoo 13 in CentOS 7<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to Install Odoo 13 in CentOS 7&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-install-odoo-13-in-centos-7.html\/embed#?secret=tCeyzXrYrI\" data-secret=\"tCeyzXrYrI\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The other way, is the enable logging to a file. This has to be enabled from the odoo.conf file which is located under \/etc\/ folder. First we open the \/etc\/odoo.conf file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nano \/etc\/odoo.conf<\/pre>\n\n\n\n<p>Now, search to see if you have a directive called &#8216;logfile&#8217;. If you don&#8217;t, you may add the following to \/etc\/odoo.conf:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">logfile = \/var\/log\/odoo13\/odoo.log<\/pre>\n\n\n\n<p>If you already have the directive, but commented out, like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">; logfile = \/var\/log\/odoo13\/odoo.log<\/pre>\n\n\n\n<p>You may remove the &#8216;;&#8217; in front of the logfile directive and save the file. Now you may restart your Odoo instance to allow odoo log the information to the file \/var\/log\/odoo13\/odoo.log<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">systemctl restart odoo13<\/pre>\n\n\n\n<p>If the restart showing some errors, probably because it is failing to put permission to odoo13 folder. You may try the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir \/var\/log\/odoo13\nchown -Rf odoo:odoo \/var\/log\/odoo13\nsystemctl restart odoo13<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are two ways to see the Odoo Logs. One is rough and can be used to see the latest Odoo logs, it&#8217;s the Journal tools. You may do this using the following if your Odoo service is installed as odoo13 for example Note: If you are having trouble primarily in installing Odoo properly, you &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/how-to-enable-logging-in-odoo.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Enable Logging in Odoo&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[292,26],"tags":[482,297],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/645"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/645\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}