Change the app-name sent by docker's syslog driver <p>I'm using <a href="https://papertrailapp.com/">Papertrail</a> to collect my Docker container's logs. Do to that, I used the syslog driver when I created the container:</p> <pre><code>sudo docker run --name my_container --log-driver=syslog ... </code></pre> <p>... and added the following line to my <code>/etc/rsyslog.conf</code></p> <pre><code>*.* @logsXXX.papertrailapp.com:YYYY </code></pre> <p>At the end, I get on Papertrail logs like this:</p> <pre><code>Apr 24 13:41:55 ip-10-1-1-86 docker/3b00635360e6: 10.0.0.5 - - [24/Apr/2015:11:41:57 +0000] "GET /healthcheck HTTP/1.1" 200 0 "-" "" "-" </code></pre> <p>The problem is that the app-name (see <a href="https://tools.ietf.org/html/rfc5424">syslog RFC</a>) is <strong>docker/container_id</strong></p> <p>I would rather have the container name (or host). But I don't know how to do. I tried to set a specific hostname to my container like below, but it didn't work better:</p> <pre><code>sudo docker run --name my_container -h my_container --log-driver=syslog ... </code></pre>