Closed chiqui3d closed 3 years ago
Everything should be tailed to the stdout of the container so it is available through docker logs. Then, you can fetch the log file from the host directory where the logs of your container are stored (usually /var/lib/docker/containers/<container_id>/<container_id>-json.log
) or use the ELK stack to scrap the new lines from there.
Thank you very much @fradelg, I finally did that, but ELK could not install it on my PC to test it (it consumes a lot of resources), so I am with Grafana and Loki who has a plugin for docker logging.
Hello!,
I would like to mount the
mysql_backup.log
file on the host, that way I can manage it with a log provider like ELK, I don't know if I'm wrong but as the file is in the root directory I have no choice than to mount the full system.Is it possible to move it to the /var/log directory?
I don't know if there is a better way to manage the logs in production.