title: Understanding docker logs
body: <p>We all know that we can search for a string in a log file and show the surroundings lines to the searched string:<br>
  <i>grep -AXX -BXX &quot;searched&quot; file.log</i></p>
  <p>Is possible do the same with the docker logs command?<br>
  I want to do is that if already know the string i'm searching happened around one hour ago,  using &quot;since&quot; with &quot;after&quot; and &quot;before&quot;, get only the result and not all the log, for example something like this:<br>
  <i>docker logs --since=65m -A20 -B5 &quot;searched string&quot;  [ID]</i></p>
  <p>By now i copy all to a file, resulting sometimes a big file, and use a grep:<br>
  <i>docker logs --since=65m [ID] &gt;&gt; file.log<br>
  grep -AXX -BXX &quot;searched&quot; file.log</i></p>