I want to send all logs from docker postgresql container to my host journald service.
i.e. I want to be able to read docker container logs at host machine using tail -f /var/logs/messages or journald -f
here is my docker-compose config:
postgres:
restart: unless-stopped
image: postgres:9.6
ports:
- "5432:5432"
logging:
driver: syslog
options:
syslog-address: "udp://127.0.0.1:514"
I've been trying different solutions but everytime i got an error from docker:
postgres_1 | WARNING: no logs are available with the 'syslog' log driver
and I cannot get see logs on the host machine.
I'm not sure, what I'm doing wrong?
Thank you in advance