How can I output log messages to stdout/stderr? I can create log messages really easily in Drupal 9.x like this;
\Drupal::logger('mymodule')-&gt;error(&quot;something went wrong&quot;);

I see these messages appear in /admin/reports/dblog, but it would be convenient if I had the option to print them to stdout, or perhaps a file that I could tail. Is this possible?
Note that this question looks similar but I think it's for an older version of drupal using watchdog, so I don't think it applies: how to show admin/reports/dblog in terminal ( cli )
I’ve been using the log_stdout module for stdout logging. It works well with Docker containers.

This module provides a hook for Drupal Watchdog that directs log messages to php://stdout or php://stderr for better log handling with Docker.