Skip to Content
Menu
This question has been flagged
4 Replies
88797 Views

 

I correctly set the log file in odoo config file but i got nothing in the log file.
I dont know why.
this is lines that i put in config file :

...........
 logfile = /var/log/openerp/openerp-server.log
log_level = info

I also execute this commandes line:

bash#mkdir -p /var/log/openerp/
bash#touch /var/log/openerp/openerp-server.log
bash#chown openerp /var/log/openerp/openerp-server.log
bash#chmod 644 /var/log/openerp/openerp-server.log

Any help !!!!!!

Avatar
Discard
Best Answer

In V8 user=odoo, try this:

chown odoo  /var/log/openerp/openerp-server.log

and you add (or other handler):

log_handler = ["[':INFO']"]

Avatar
Discard
Author Best Answer


I do this but still not working

ls -l commande send this information:

[user@localhost openerp ] # ls -l

-rw-r--r--. 1 odoo root 0 Jan 28 15:25 openerp-server.log

and ther is my odoo config:

[options]
; This is the password that allows database operations:
admin_password=#####
db_host=localhost
db_port=5432
db_user=######
db_password=#######
addons_path=/usr/lib/python2.7/site-packages/openerp-8.0_c7d8e97-py2.7.egg/openerp/addons/
logfile=/var/log/openerp/openerp-server.log
log_handler=["[':INFO']"]
log_level=info

 

and whene i execute systemctl status openerp.service i got that

.................

python /usr/local/bin/openerp-server -c /etc/openerp-server.conf --pid=/run/openerp/openerp-server.pid --syslog

...................

Any help please !!!!!

 

Avatar
Discard

you drop --syslog and posibbly add --logfile /var/log/openerp/openerp-server.log

Author

how can i do that

I do not know what your system and install method, probably in /etc/init.d/odoo

Author

done thanks for help.

Best Answer

Perhaps useful for others because this question was asked a long time ago.

In your configuration file add the following lines:

# Logging
log_handler = werkzeug:WARNING, :INFO
log_level = info
logfile = /var/log/odoo/odoo.log
logrotate = True

(Change settings as you seem fit. The following URL provides a list of command line parameters which can be used in the configuration file as well: https://odoo-development.readthedocs.io/en/latest/admin/log-handler.html)

It's important that the user under which odoo runs has write permissions to the directory where the log files are stored. In my case it runs as user odoo16 member of group odoo16. So using sudo or as root create a log directory for odoo as follows:

# mkdir /var/log/odoo

# chown root:odoo16 /var/log/odoo

# chmod 775 /var/log/odoo

# ls -l /var/log

drwxrwxr-x 2 root odoo16 4096 Oct 28 16:54 odoo


The result should be as above. Next restart your odoo service, odoo16 in my case.

# systemctl restart odoo16


Avatar
Discard
Best Answer

please can you give more details i hve a same issue when i check my odoo status i got this error 

/odoo.service; disabled; vendor preset: enabled)
since Wed 2021-09-01 16:45:57 UTC; 36min ago

odoo/odoo-bin -c /etc/odoo-server.conf (code=exited, status=2)
=2)

 Started Odoo.
4541]: Usage: odoo-bin [options]
4541]: odoo-bin: error: The config file '/etc/odoo-server.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to gen>
 odoo.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
 odoo.service: Failed with result 'exit-code'.


Avatar
Discard
Related Posts Replies Views Activity
1
Apr 25
6071
0
Jul 20
2643
4
Oct 16
35029
5
Jul 24
36175
2
Dec 23
19302