mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
e611a189cb
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) |
||
---|---|---|
.. | ||
fixtures | ||
check_test.go | ||
docker_api_attach_test.go | ||
docker_api_build_test.go | ||
docker_api_containers_test.go | ||
docker_api_create_test.go | ||
docker_api_events_test.go | ||
docker_api_exec_resize_test.go | ||
docker_api_exec_test.go | ||
docker_api_images_test.go | ||
docker_api_info_test.go | ||
docker_api_inspect_test.go | ||
docker_api_logs_test.go | ||
docker_api_network_test.go | ||
docker_api_resize_test.go | ||
docker_api_service_test.go | ||
docker_api_stats_test.go | ||
docker_api_test.go | ||
docker_api_version_test.go | ||
docker_api_volumes_test.go | ||
docker_cli_attach_test.go | ||
docker_cli_attach_unix_test.go | ||
docker_cli_build_test.go | ||
docker_cli_build_unix_test.go | ||
docker_cli_by_digest_test.go | ||
docker_cli_commit_test.go | ||
docker_cli_config_test.go | ||
docker_cli_cp_from_container_test.go | ||
docker_cli_cp_test.go | ||
docker_cli_cp_to_container_test.go | ||
docker_cli_cp_utils.go | ||
docker_cli_create_test.go | ||
docker_cli_daemon_experimental_test.go | ||
docker_cli_daemon_test.go | ||
docker_cli_diff_test.go | ||
docker_cli_events_test.go | ||
docker_cli_events_unix_test.go | ||
docker_cli_exec_test.go | ||
docker_cli_exec_unix_test.go | ||
docker_cli_experimental_test.go | ||
docker_cli_export_import_test.go | ||
docker_cli_help_test.go | ||
docker_cli_history_test.go | ||
docker_cli_images_test.go | ||
docker_cli_import_test.go | ||
docker_cli_info_test.go | ||
docker_cli_inspect_experimental_test.go | ||
docker_cli_inspect_test.go | ||
docker_cli_kill_test.go | ||
docker_cli_links_test.go | ||
docker_cli_links_unix_test.go | ||
docker_cli_login_test.go | ||
docker_cli_logs_test.go | ||
docker_cli_nat_test.go | ||
docker_cli_netmode_test.go | ||
docker_cli_network_test.go | ||
docker_cli_pause_test.go | ||
docker_cli_port_test.go | ||
docker_cli_proxy_test.go | ||
docker_cli_ps_test.go | ||
docker_cli_pull_local_test.go | ||
docker_cli_pull_test.go | ||
docker_cli_pull_trusted_test.go | ||
docker_cli_push_test.go | ||
docker_cli_rename_test.go | ||
docker_cli_restart_test.go | ||
docker_cli_rm_test.go | ||
docker_cli_rmi_test.go | ||
docker_cli_run_test.go | ||
docker_cli_run_unix_test.go | ||
docker_cli_save_load_test.go | ||
docker_cli_save_load_unix_test.go | ||
docker_cli_search_test.go | ||
docker_cli_service_test.go | ||
docker_cli_start_test.go | ||
docker_cli_start_volume_driver_unix_test.go | ||
docker_cli_stats_test.go | ||
docker_cli_tag_test.go | ||
docker_cli_top_test.go | ||
docker_cli_version_test.go | ||
docker_cli_volume_test.go | ||
docker_cli_wait_test.go | ||
docker_hub_pull_suite_test.go | ||
docker_test_vars.go | ||
docker_utils.go | ||
registry.go | ||
requirements.go | ||
requirements_unix.go | ||
test_vars_exec.go | ||
test_vars_noexec.go | ||
test_vars_unix.go | ||
test_vars_windows.go | ||
trust_server.go | ||
utils.go |