title: Most efficient way to tail a rolling log file in Windows
body: <p>What is the most efficient way to tail log files that are rolled over when they get to a certain size. Some app log files can get quite large, 100+ MB.</p>
  
  <p>For example:
  Tailing "file.log".</p>
  
  <p>After it gets to 25MB, that file is renamed ("file.log.1"). A new blank fresh "file.log" is created to replace it.</p>
  
  <p>One option I found is: PowerShell cmdlet Get-Content </p>
  
  <pre><code>gc file.log -wait -tail 1
  </code></pre>
  
  <p>Anyone know if it is <em>smart enough</em> to know that a file has rolled over (re-named, re-created) as such no line is missed during the roll over?</p>
  
  <p>Or if some checks are needed. If so can I get some ideas please.</p>
  
  <p>Any better options for Windows?</p>
  
  <p>Thanks.</p>