Rsyslog container

Rsyslog can be used to stream your applications logs (watchdog). It's similar to using syslog, however there's no syslog in PHP container (one process per container). Rsyslog will stream all incoming logs to a container output.

Here how you can use it with Monolog:

  1. Install monolog module. Make sure all dependencies being downloaded
  2. Add new handler at monolog/monolog.services.yml:
monolog.handler.rsyslog:
  class: Monolog\Handler\SyslogUdpHandler
  arguments: ['rsyslog']
  1. Rebuild cache (drush cr)
  2. Use rsyslog handler for your channels
  3. Find your logs in rsyslog container output

Read Logging in Drupal 8 to learn more.