Answers: <p>What do you mean by "it doesn't work"? I got an error suggesting that the log format wasn't correct:</p>
  
  <pre><code>Fatal error has occurred
  Error occured at: src/goaccess.c - set_curses - 1394
  No time format was found on your conf file.
  </code></pre>
  
  <p>When I edited <code>/etc/goaccess.conf</code> (i.e. uncommented/selected <code>time-format</code>, <code>date-format</code> and <code>log-format</code>) the <code>docker logs mycontainer | goaccess -</code> command works as expected.</p>
  
  <p>As an aside, for my <code>nginx</code> proxy inside my docker container, I had to set my <code>log_format</code> as follows:</p>
  
  <pre><code>log-format %v %h %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u"
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2019-11-13T23:35:45.527Z
Answers: 2019-11-13T23:35:45.527Z
Answers: Tom
Body: <p>How to parse <code>docker logs</code> output / tail output through goaccess? When I do: </p>
  
  <pre><code>docker container logs mycontainer &gt; logs
  </code></pre>
  
  <p>and then <code>goaccess -f logs</code> it works perfectly, but if I do <code>docker logs --tail all mycontainer | goaccess -</code> it doesn't work :( but in the manual  you can do this via tailing command: <a href="https://goaccess.io/man" rel="nofollow noreferrer">https://goaccess.io/man</a> </p>
  
  <pre><code>tail -f access.log | goaccess -
  </code></pre>
  
  <p>Pls help :( I think the problem is that the native tailing differs from docker's?</p>
  
Tags: <docker><logging>
Title: How to parse command output (docker log) through goaccess?
UserDisplayName: Marat Mkhitaryan
ThreadText: # How to parse command output (docker log) through goaccess?
  
  (Asked by: username_0 on 2019-08-13)
  
  How to parse `docker logs` output / tail output through goaccess? When I do:
  
  ```
  docker container logs mycontainer > logs
  
  ```
  
  and then `goaccess -f logs` it works perfectly, but if I do `docker logs --tail all mycontainer | goaccess -` it doesn't work :( but in the manual you can do this via tailing command: <https://goaccess.io/man>
  
  ```
  tail -f access.log | goaccess -
  
  ```
  
  Pls help :( I think the problem is that the native tailing differs from docker's?
  
  **Tags:** docker, logging
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-11-13. Score: 4 | Accepted answer
  
  What do you mean by "it doesn't work"? I got an error suggesting that the log format wasn't correct:
  
  ```
  Fatal error has occurred
  Error occured at: src/goaccess.c - set_curses - 1394
  No time format was found on your conf file.
  
  ```
  
  When I edited `/etc/goaccess.conf` (i.e. uncommented/selected `time-format`, `date-format` and `log-format`) the `docker logs mycontainer | goaccess -` command works as expected.
  
  As an aside, for my `nginx` proxy inside my docker container, I had to set my `log_format` as follows:
  
  ```
  log-format %v %h %^ %^ [%d:%t %^] "%r" %s %b "%R" "%u"
  
  ```
  
  
  ---
  
  