Hilfe

1

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

Avatar
Tomek

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

4 Kommentare
Avatar
Verwerfen
Avatar
Antonio
-

Do you have permission to write to those folders?

Avatar
Paresh Wagh
-

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

Avatar
Tomek
-

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

Avatar
Paresh Wagh
-

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

2 Antworten
0
Avatar
Paresh Wagh
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.


1 Kommentar
Avatar
Verwerfen
Avatar
Tomek
-

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.

0
Avatar
Tomek
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
Verwerfen