Container logging configuration
By default Docker writes container logs to the host filesystem — fine for local development. In a big cluster you usually want logs in centralized storage such as Logstash or Graylog.
Docker supports this through
logging drivers, and WebSummoner
lets you set the driver globally for every browser container it starts, via
the -log-conf flag.
File format
Section titled “File format”config/container-logs.json:
{ "Type": "syslog", "Config": { "syslog-address": "tcp://192.168.0.42:123", "syslog-facility": "daemon" }}Type— any Docker logging driver:syslog,journald,awslogs, …Config— key-value options for that driver.
The example above is equivalent to running containers with:
--log-driver=syslog \--log-opt syslog-address=tcp://192.168.0.42:123 \--log-opt syslog-facility=daemonUsing it
Section titled “Using it”./websummoner -log-conf config/container-logs.json