Hi,
in my docker compose file , i have this - LOG_PATH=/opt/domoticz/userdata/log/domoticz.log and the log is wrote in the var/log
i needed the log for fail2ban
but the log of the container content the same log of my file domoticz.log is it possible to desactivate the container log from domoticz application ?
but when i launch the command docker container logs -f domoticz Error response from daemon: configured logging driver does not support reading, perhaps it’s exclusive !
Tow point
how can i desactivate the domoticz log in the container log ?
how can i put the json-file log in the directory /var/log (it’s a tmpfs directory)
I feel you should try to explain your problem better. I’m not exactly sure what you want to deactivate (I guess this is what you meant) and I know nothing about Domoticz. Containerized applications usually log to the containers standard output and error stream. That is what you the logging drivers collect and save in a file or send to a remote server. If you set the logging driver to be “none”, there will be nothing to save the logs from the standard streams and the docker logs command will not return anything.
If you don’t want the container to log in a file inside the container, that is something for which you need to know the application or at least have a documentation for the Docke rimage you are using where the author hopefully documented it.
Assuming the environment variable can be changed to any file path and the application doesn’t need it to be a regular file, you can try to set this:
LOG_PATH=/dev/stdout
so log lines that were saved in the domoticz.log file will appear in the output of docker logs, just don’t disable the logging driver by setting it to “none”
I don’t know domoticz better than I knew when I wrote my previous message so I can’t help you with that. All I can say is that either the variable is not used by the app or you forgot to recreate the container by running. For better answers you will need to ask someone who knows Domoticz.