Skip to content

[14.0] Logs not accesible from docker log #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fizcris opened this issue Dec 18, 2020 · 2 comments
Open

[14.0] Logs not accesible from docker log #345

fizcris opened this issue Dec 18, 2020 · 2 comments

Comments

@fizcris
Copy link

fizcris commented Dec 18, 2020

Logs are sucesffully stored in /var/log/odoo/ but they cannot be seen with docker logs.

This nginx solution might be helpful:

# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
	&& ln -sf /dev/stderr /var/log/nginx/error.log
@fizcris fizcris changed the title [14.0] Logs nbot accesible from docker log [14.0] Logs not accesible from docker log Dec 29, 2020
@vintesoft
Copy link

vintesoft commented Sep 24, 2022

@fizcris I'd like to share with you my own solution to this problem, that is log in both "docker log" and "file log".

By default, Odoo log goes only to "docker log". To also get "file log", just put the following line tinto entrypoint.sh:

# ...

# redirect stdout and stderr into file
exec &> >(tee "/var/log/odoo/odoo-entrypoint.log")

# ...

@fizcris it's funny, because my solution is opposite to yours :)

@lathama
Copy link

lathama commented Apr 11, 2024

@fizcris can you confirm this with Odoo 17? If this issue is no longer needed please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants