Add support for details on service logs#42
Conversation
| // string is not in a valid format | ||
| // the exact form of details encoding is implemented in | ||
| // api/server/httputils/write_log_stream.go | ||
| func ParseLogDetails(details string) (map[string]string, error) { |
There was a problem hiding this comment.
Actually this is in the wrong place
b22ea84 to
7230906
Compare
|
includes #45 because i need tests on docker to pass and they won't without this |
|
please ping me directly on slack when you're reviewing this. |
66a2871 to
131f9be
Compare
|
rebased onto master. vendored moby at the dependent commit. |
thaJeztah
left a comment
There was a problem hiding this comment.
had a quick glance; left two comments
| // options specific to service logs | ||
| flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names in output") | ||
| flags.BoolVar(&opts.noTrunc, "no-trunc", false, "Do not truncate output") | ||
| flags.BoolVar(&opts.raw, "raw", false, "Do not neatly format logs") |
There was a problem hiding this comment.
can you add an API version annotation here?
flags.SetAnnotation("raw", "version", []string{"1.30"})| flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output") | ||
| flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)") | ||
| flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps") | ||
| flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs") |
There was a problem hiding this comment.
can you add an API version annotation here?
flags.SetAnnotation("details", "version", []string{"1.30"})131f9be to
3043122
Compare
|
@thaJeztah fixed. |
| } else { | ||
| output = append(output, part...) | ||
| // then sort em | ||
| sort.Strings(detailKeys) |
There was a problem hiding this comment.
I don't think you need this. I'm pretty sure you can just sort the d slice.
There was a problem hiding this comment.
yeah, i think you're right. this is hold-over code from when i was caching the details keys.
3043122 to
93240c2
Compare
|
@dnephin fixed. |
|
Needs a rebase |
93240c2 to
9025f7f
Compare
|
took the wrong vendor commit on rebase, i force-pushed change but i think gh is broken right now. this should fix it, though. |
Adds CLI and client support for details on service logs. CLI component of moby/moby#32996. Signed-off-by: Drew Erny <drew.erny@docker.com>
a96dd33 to
ebc0eff
Compare
Remove unneeded line in 17.06 CHANGELOG
Adds CLI and client support for details on service logs. CLI component of moby/moby#32996.