Viktor Dukhovni: > > > > On Dec 19, 2017, at 10:19 AM, Eray Aslan <er...@a21an.org> wrote: > > > > Usually sending log output to console is the preferred approach. If we > > cannot do it natively, having syslog daemon write to console (in > > addition to local log file?) looks like a better option than importing > > sockets from the host. > > Not an option for Postfix. Multiple processes generate log messages > concurrently, a shared output stream would result in interleaving of > message fragments. The syslogd service receives discrete messages > and serializes output. It is important to use a datagram syslog > service, to preserve chronological message order.
It should be possible to run an in-container process that receives syslog datagrams from all Postfix daemons, and that sends complete text records one-by-one, as long as there is only one thread that writes to stdout/stderr. However, I have concerns about the performance cost of multiple layers of forwarding that handles the logging from hundreds of concurrent Postfix daemon processes, on top of a Linux logging infrastructure that is already insanely expensive. Wietse