Q:

Log to syslog / console in macOS from Docker container?

I set my Docker container set to send logs to the hosts logs on CentOS 7 (with --log-driver syslog). I'd like to replicate this on macOS (Sierra). But it doesn't show up anywhere, seemingly.
$ docker run --log-driver syslog -it busybox sh
/ # logger "Hello world!"
/ # exit

And:
$ sudo cat /var/log/system.log | grep "Hello world"
Password:
$

What configuration is necessary to make it possible for any Docker system logging command for any arbitrary container to appear in a log file on macOS?

I can view these types of default system logging if I do not configure log-driver. But Ruby's syslog implementation must log differently.
$ docker run --log-driver syslog -it centos /bin/bash
# yum install ruby -y
# ruby -e "require 'syslog/logger'; log = Syslog::Logger.new 'my_program'; log.info 'this line will be logged via syslog(3)'"
# exit
$ sudo tail -n 10000 /var/log/system.log | grep "syslog(3)"
$ 

A:

It depends on how you are logging your message.
As mentioned in "Better ways of handling logging in containers " by Daniel Walsh:

One big problem with standard docker containers is that any service that writes messages to syslog or directly to the journal get dropped by default.
  Docker does not record any logs unless the messages are written to STDIN/STDERR. There is no logging service running inside of the container to catch these messages.

So a simple echo should end up in syslog, as illustrated by the chentex/random-logger image.
From Docker for Mac / Log and Troubleshooting, you can check directly if you see any logs after your docker run:

To view Docker for Mac logs at the command line, type this command in a terminal window or your favorite shell.

$ syslog -k Sender Docker

Check the content of ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log.
Syslog driver was added in PR 11458

