Skip to Content
Menu
This question has been flagged
6 Replies
21399 Views

No matter what directory I'll set in odoo.conf, I'm receiving the same error again and again.


ERROR: couldn't create the logfile directory. Logging to the standard output.


I was trying to set:

logfile = /etc/odoo

logifle = /tmp

logfile = /var/log/odoo


Docker Compose examples from official https://hub.docker.com/_/odoo

Avatar
Discard

Do you have permission to write to those folders?

Are you using docker volume or mapping to a directory on the host?

Author

In logs case I don't use volumes. /var/log/odoo is created during docker build - according to official dockerfile definition.

I have posted an answer based on your clarification. Please take a look.

Best Answer

Hi Tomek:

If you use the default setting for the Odoo container without specifying the -v command line parameter at the time of creating the container, the log file location is manager by Docker. You can find the exact location of the log file by using the following Linux command.

docker inspect your_container_name | grep LogPath

If you want to manage the log file yourself, you need to create the container to use a directory on the host machine by using the -v command line parameter (-v YOUR_HOST_LOGDIR:/var/lib/odoo). Once you do that the log file will be created in that directory.


Avatar
Discard
Author

Hi Paresh,

Thank You fo your response.

I was trying to put logs into volumes too. It always looks the same:

web_1 | ERROR: couldn't create the logfile directory. Logging to the standard output.

I'm using official dockerfile with my small changes:

https://github.com/odoo/docker/blob/b4c45baf1f0579c654129ac9efe99a929569dab6/13.0/Dockerfile

And docker compose:

version: '2'

services:

web:

image: odoo:12.0

depends_on:

- db

ports:

- "8069:8069"

volumes:

- odoo-web-data:/var/lib/odoo

- ./config:/etc/odoo

- ./addons:/mnt/extra-addons

db:

image: postgres:10

environment:

- POSTGRES_DB=postgres

- POSTGRES_PASSWORD=odoo

- POSTGRES_USER=odoo

- PGDATA=/var/lib/postgresql/data/pgdata

volumes:

- odoo-db-data:/var/lib/postgresql/data/pgdata

volumes:

odoo-web-data:

odoo-db-data:

I was trying to direct logs in many locations: inside volumes (including every volume), outside volume. Always the same error, and no logs store.

Author Best Answer

cd /var/log

-rw-r--r-- 1 root root   3264 Jun 29 07:20 faillog
-rw-r--r-- 1 root root   1931 Jun 29 07:17 fontconfig.log
-rw-rw-r-- 1 root utmp  29784 Jun 29 07:20 lastlog
drwxr-xr-x 1 odoo odoo   4096 Jun 29 07:20 odoo
-rw-rw-r-- 1 root utmp      0 Jun  7 00:00 wtmp

Maybe it shouldn't be user odoo but docker (1000) ?

How can I be sure that odoo take really path to logfile from odoo.conf ?


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 22
3292
1
Nov 20
5452
0
Jun 20
9878
2
Dec 24
3583
2
Oct 23
5642