title: Monolog stdout/stderr logs to current terminal process in Docker
body: <p>I have a PHP/Symfony app running in Docker which uses Monolog to log to stdout/stderr. This all works great, except when running Symfony console commands inside a container.</p>
  
  <pre><code>monolog:
      handlers:
          stdout:
              type: filter
              handler: stdout_unfiltered
              max_level: notice
              channels: ['!event']
  
          stdout_unfiltered:
              type: stream
              level: debug
              path: 'php://stdout'
  
          stderr:
              type: stream
              level: warning
              channels: ['!event']
              path: 'php://stderr'
  
          console:
              type: console
              channels: ['!console', '!doctrine', '!event']
              process_psr_3_messages: false
  
  </code></pre>
  
  <p>The problem is that whenever a command is executed, the "stdout", "stderr" and "console" handlers log to the current terminal process. This causes the console output to be messed up, and <code>docker logs</code> not to contain the log entries: <a href="https://i.imgur.com/yB1IKrR.png" rel="noreferrer">http://i.imgur.com/yB1IKrR.png</a>.</p>
  
  <p>Would there be an easy way to always send the logging output to the php-fpm (or any worker) process?</p>