تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
6 الردود
21429 أدوات العرض

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

الصورة الرمزية
إهمال

Do you have permission to write to those folders?

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

الكاتب

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.

أفضل إجابة

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.


الصورة الرمزية
إهمال
الكاتب

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.

الكاتب أفضل إجابة

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 ?


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 22
3296
1
نوفمبر 20
5455
0
يونيو 20
9884
2
ديسمبر 24
3641
2
أكتوبر 23
5666