Logging on docker images

Currently the docker image only logs the uwsgi information to stdout (which can be accessed by docker logs) but this information is not really usefull as it does not contain any tryton related information.

My idea was to mount a docker volume so logs are accessible from the host and can be reviewed latter but the problem I found is that docker images are running using trytond user and this causes a permision error when accessing volumes as they are only accessible by root. This can be solved by creating the logs directory in the docker image and changing it’s permisions so the trytond user can write and read on this directory.

How are you handling logging files in tryton when using docker?

Do you thing will be a good improvement to add a default logging configuration on the tryton-docker images?

For me, the trytond logs are also displayed in the docker logs but it is only the default ERROR level (login failure usually).
I do not think it will be a good practice to store logs on a volume. We should use the docker feature or use an external services like Sentry Tryton module.

Now I do not know why I get only the logging message but without any timestamp or level.

I found why. It is because config_log is not called in application.py. So we have the default behavior of logging module.

I created Issue 8510: Setup default logging on wsgi application - Tryton issue tracker

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.