Created
July 25, 2019 17:46
-
-
Save johnharris85/ad0f9ec1637c31586871237d82daf647 to your computer and use it in GitHub Desktop.
compose logging test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"debug":true, | |
"experimental":true, | |
"metrics-addr":"0.0.0.0:9323", | |
"log-driver":"journald", | |
"log-opts":{ | |
"tag":"{{.Name}}" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
web: | |
image: johnharris85/simple-hostname-reporter:3 | |
container_name: test_container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
Jul 25 10:42:29 jpersonal dockerd[5461]: time="2019-07-25T10:42:29.676128154-07:00" level=debug msg=event module=libcontainerd namespace=moby topic=/tasks/start | |
Jul 25 10:42:29 jpersonal test_container[5461]: * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) | |
Jul 25 10:42:29 jpersonal test_container[5461]: * Restarting with stat | |
Jul 25 10:42:29 jpersonal dockerd[5461]: time="2019-07-25T10:42:29.872058831-07:00" level=debug msg="sending heartbeat to manager { } with timeout 5s" method="(*session).heartbeat" module=node/agent node.id=mdmk0942jhclrg5veckgfspx7 session.id=lz7esjg63r658hpe5gq9afi43 sessionID=lz7esjg63r658hpe5gq9afi43 | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works. But only if the logging driver is configured in docker-compose.yml:
Ubuntu 18.04, Docker repo from docker.com. Possible a behavior of this combination. Tested on 2 Ubuntu 18 machines.