Bug 1386661
Summary: | docker logs useless messages to journald | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jakub Filak <jfilak> |
Component: | docker | Assignee: | Daniel Walsh <dwalsh> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | adimania, admiller, amurdaca, dwalsh, ichavero, jberan, jcajka, jchaloup, lsm5, marianne, miminar, nalin, riek, vbatts |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-10-19 13:58:58 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jakub Filak
2016-10-19 12:05:49 UTC
docker logs all stdout/stderr to journal, that is by design. You can specify alternative loggers via the docker run command. Heck to see if the journald Hello ended up somewhere else. Not sure what happened to it. Unless systemd/journald is doing something to drop the message. sh-4.3# python <<< "from systemd import journal; journal.send('journald Hello')" sh-4.3# logger "journald logger Hello" sh-4.3# exit sh-4.3# journalctl -b | grep Hello Oct 19 09:53:28 dhcp-10-19-62-196.boston.devel.redhat.com root[16787]: journald logger Hello I think the journal call would send directly to the journal socket. This works for me. docker run -ti -v /dev/log:/dev/log -v /var/run/systemd/journal/socket:/var/run/systemd/journal/socket --name journald fedora sh python <<< "from systemd import journal; journal.send('journald Hello')" journalctl -b | grep HelloOct 19 09:53:28 dhcp-10-19-62-196.boston.devel.redhat.com root[16787]: journald logger Hello Oct 19 09:57:51 dhcp-10-19-62-196.boston.devel.redhat.com python[17523]: journald Hello I wrote a blog on this. Hopefully will be published on projectatomic.io https://github.com/projectatomic/atomic-site/issues/367 |