title: uvicorn suppresses python's syslog for gelf driver
body: <p>I have a <strong>docker container</strong> running logging with <strong>gelf</strong> to a logging instance via udp -- all fine!</p>
  <p>The container is based on <strong>Ubuntu 18</strong> where <strong>rsyslog</strong> is running as a service, which works well.</p>
  <p>Inside the container is a <strong>FastAPI application</strong> running with <strong>uvicorn</strong> webserver. It also works perfectly and uvicorn is perfectly logging to the logging instance.</p>
  <p>Here comes what is not working, but usually works with non-FastAPI python projects. I use python's <strong>syslog</strong> to log more stuff.</p>
  <p>The app with syslog looks like this (I created an easy example to debug for myself):</p>
  <pre class="lang-py prettyprint-override"><code>from fastapi import FastAPI
  import syslog
  
  syslog.openlog(facility=syslog.LOG_LOCAL0)
  
  app = FastAPI()
  
  syslog.syslog(syslog.LOG_INFO, 'startup done')
  
  @app.get(&quot;/&quot;)
  async def root():
      syslog.syslog(syslog.LOG_INFO, 'get hello')
      return {&quot;message&quot;: &quot;Hello World&quot;}
  </code></pre>
  <p>The logs at the logging instance don't show the syslog messages. Only uvicorn's messages:</p>
  <pre><code>INFO:     Started server process [21]
  INFO:     Waiting for application startup.
  INFO:     Application startup complete.
  INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
  INFO:     172.17.0.1:35346 - &quot;GET / HTTP/1.1&quot; 200 OK
  </code></pre>
  <p>For further debugging I checked rsyslog's log file, and it contains the syslog messages:</p>
  <pre><code>Dec 23 17:21:39 /uvicorn: startup done
  Dec 23 17:21:50 /uvicorn: get hello
  </code></pre>
  <p>and here is the rsyslog configuration at /etc/rsyslog.d</p>
  <pre><code>local0.* {
     action(type=&quot;omfile&quot; file=&quot;/var/log/test.log&quot; fileOwner=&quot;syslog&quot; fileGroup=&quot;syslog&quot; fileCreateMode=&quot;0640&quot;)
     stop
  }
  </code></pre>
  <p>What am I missing here?
  Why is gelf ignoring rsyslog?
  What do I need to understand about uvicorn concerning syslog?
  or what can I do?</p>
  <p>Thanks</p>