Bug 1011790
Summary: | [RFE] Redirect log messages to a file | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marek Goldmann <mgoldman> |
Component: | docker-io | Assignee: | Lokesh Mandvekar <lsm5> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | dmace, jkeck, lsm5, mattdm, mgoldman |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-01-03 21:24:21 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
Marek Goldmann
2013-09-25 07:17:34 UTC
I think this goes against the basic strategy of logging we have in Fedora. Instead, try: jounrnalctl -b /usr/bin/docker # <- tab completion will work or more-terse (no hostname or pid) journalctl -b -o cat /usr/bin/docker On the other hand, there's no need for docker to be logging the _date_. https://github.com/dotcloud/docker/issues/2003 (In reply to Matthew Miller from comment #2) > On the other hand, there's no need for docker to be logging the _date_. > https://github.com/dotcloud/docker/issues/2003 Perhaps this is a generic golang thing and not docker specific. Following is a relevant snippet from $GOROOT/src/pkg/log/log.go // These flags define which text to prefix to each log entry generated by the Logger. const ( // Bits or'ed together to control what's printed. There is no control over the // order they appear (the order listed here) or the format they present (as // described in the comments). A colon appears after these items: // 2009/01/23 01:23:23.123123 /a/b/c/d.go:23: message Ldate = 1 << iota // the date: 2009/01/23 Ltime // the time: 01:23:23 Lmicroseconds // microsecond resolution: 01:23:23.123123. assumes Ltime. Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile // final file name element and line number: d.go:23. overrides Llongfile LstdFlags = Ldate | Ltime // initial values for the standard logger ) Sounds like the original bug is WONTFIX, since the systemd logging behavior is correct/desirable. As to the logging format issue, it doesn't appear we can patch downstream since the Go stdlib Logger format is hard-coded: at best, you can configure a prefix string. So, we can't patch Docker to use a new format. To change the format would require an upstream change to Go to make the Logger format configurable, or to Docker to use a different logging implementation, and in either case propagate that configurability to the packager. I think the logging format issue should be a separate issue of some sort regardless. (In reply to Dan Mace from comment #4) > Sounds like the original bug is WONTFIX, since the systemd logging behavior > is correct/desirable. > > As to the logging format issue, it doesn't appear we can patch downstream > since the Go stdlib Logger format is hard-coded: at best, you can configure > a prefix string. So, we can't patch Docker to use a new format. > > To change the format would require an upstream change to Go to make the > Logger format configurable, or to Docker to use a different logging > implementation, and in either case propagate that configurability to the > packager. > > I think the logging format issue should be a separate issue of some sort > regardless. Thanks Dan. |