I am trying to get docker logs from a running docker container. I have configured splunk as logging driver in my docker compose and I understand that if splunk server is not reachable then container won't start.
proxysecurity:
image: test/image
network_mode: host
depends_on:
- zookeeper
ports:
- '8083:8083'
logging:
driver: "splunk"
options:
splunk-url: "http://XX.X2.X3.X1:XXX7/"
splunk-token: "XXXXX5-9CA1-44B8-B9E8-2XXX25"
splunk-format: json
tag: "{{.ImageName}}/{{.Name}}/{{.ID}}"
environment:
XXXCONNECT: localhost:32181
XXXXXRS: http://localhost:8083
Now if splunk server is not reachable when container is up and running , is there any fall back mechanism wherein we can tell docker container to log locally ? Or is there any way to log to splunk as well as locally inside container ?