moby--moby/api/client
Nalin Dahyabhai e611a189cb Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
2015-09-11 16:50:03 -04:00
..
ps Truncating image id to 12 in docker ps 2015-08-07 20:53:48 -04:00
attach.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
build.go Windows: Allow UNC paths on build 2015-08-17 11:03:54 -07:00
cli.go Refactor CLI docker save 2015-09-11 15:31:55 +08:00
client.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
commit.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
cp.go Windows: Fix absolute checks 2015-09-01 08:41:37 -07:00
create.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
diff.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
events.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
exec.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
export.go api/client fix golint errors/warnings 2015-07-29 17:20:54 +00:00
hijack.go Change all docker -d to docker daemon 2015-08-10 20:48:08 +08:00
history.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
images.go Fix #8048 : make `docker images repository:tag` work 2015-08-13 08:50:09 +02:00
import.go adding message option to the import subcommand 2015-08-25 02:55:04 +00:00
info.go Typo: remove unconsistent period in docker info 2015-08-08 13:06:59 +08:00
inspect.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
kill.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
load.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
login.go Use TrimSpace to instead of Trim 2015-09-09 19:37:33 +08:00
logout.go Remove useless if-else 2015-08-08 20:02:44 +08:00
logs.go Add log reading to the journald log driver 2015-09-11 16:50:03 -04:00
network.go "docker network" missing from docker --help 2015-09-04 15:34:17 +09:00
pause.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
port.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
ps.go Fix ignore `-q` flag in `docker ps` when there is a default format. 2015-08-17 10:48:04 -07:00
pull.go Documentation improvements and code cleanups for graph package 2015-07-30 14:27:10 -07:00
push.go Use notary library for trusted image fetch and signing 2015-07-24 14:08:20 -07:00
rename.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
restart.go api/client/restart.go:Fix a typo in comment 2015-08-26 18:59:56 +08:00
rm.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
rmi.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
run.go Lint fixes on runconfig 2015-07-27 21:23:15 +02:00
save.go Refactor CLI docker save 2015-09-11 15:31:55 +08:00
search.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
service.go api/client fix golint errors/warnings 2015-07-29 17:20:54 +00:00
start.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
stats.go Fix connection block when using docker stats API 2015-09-06 17:21:41 +08:00
stats_unit_test.go Fix docker stats show blkio when there are multiple block devices. 2015-08-20 11:46:21 +08:00
stop.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
tag.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
top.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
trust.go Updated to use latest version of notary 2015-07-31 17:32:35 -07:00
unpause.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00
utils.go Make RegistryConfig a typed value in the api. 2015-09-07 19:29:33 -04:00
version.go fix golint warnings/errors on package api/types/ 2015-08-07 09:43:43 +08:00
volume.go Add --help to "docker volume inspect --help" output 2015-09-08 14:24:00 -07:00
wait.go cli: new daemon command and new cli package 2015-07-23 19:44:46 -04:00