60

On windows how can I easily monitor a log file and see updates to the file in real time?

Basically, same functionality like tail -f log_file on Unix systems

Platform: Windows XP/2003/2008 server

[Update] this is quite handy for a quick monitoring(thanks to Ckarras's answer)
Quick screen shot of PowerShell type -wait (type is an alias for get-content) alt text

7
  • Which IDE are you using? May 8, 2009 at 6:28
  • @Sung, Do you need readonly or editable?
    – Pacerier
    Aug 25, 2015 at 10:29
  • 2
    @dance2die — It is very frustrating to search for answers to real tech questions that I have only to find the question that could have possibly answered my question was closed by the pendants on the site for some arcane reason. It has me leaving the site with a negative feeling about the sites. And I say this as a former moderator on one of StackExchange sites. #justsaying Jan 11, 2022 at 17:28
  • 1
    @MikeSchinkel This question does have potential should I had kept it up to date. Hopefully folks w/ enough reps can reopen and reply with latest ways
    – dance2die
    Jan 12, 2022 at 1:40
  • 2
    How is this question even remotely off-topic?! Monitoring windows log files, sounds a lot like the first two bullet points of "on-topic" items listed here serverfault.com/help/on-topic
    – Rory
    Jan 16, 2022 at 20:41

13 Answers 13

12

I've been using BareTailPro for awhile, and have been very pleased. It hasn't been updated in awhile, but it still meets my needs. There's also a free version.

Here's some of the features:

  • View files of any size (> 2GB)
  • Configurable highlighting
  • Monitor multiple files simultaneously
  • High-performance search algorithm
  • Regular expression text search
  • Filter tail mode (include or exclude lines)
2
  • 1
    This is what (BareTail Free version) I settled with for now. Thanks Rob
    – dance2die
    Jul 19, 2009 at 17:35
  • This is much slow for big files with long lines and the last update is from 2006 (12 years ago). The best program is pointed on this other answer Log viewer on Windows. The program glogg despite being simpler than this, handles big files with much better performance, was updated just last year, is open source (github.com/nickbnf/glogg) and has support to Windows, Linux and Max OSX.
    – user
    Jan 25, 2018 at 15:12
41

There's also an equivalent to "tail -f" under Windows, if you have PowerShell installed:

type -wait
6
  • 2
    Wow. this is quite awesome. I had no idea about that "-wait" option for "Get-Content". Thanks ckarras. I have also updated question with the screenshot.
    – dance2die
    Sep 12, 2009 at 17:41
  • 4
    Have an upvote for giving an answer that shows you can do this right out of the box if you know how to use OS and that you don't need to install 3rd party tools.
    – Ryan Ries
    Nov 9, 2012 at 13:51
  • For those of us unfamiliar with tail -f, what does type -wait do?
    – Stevoisiak
    Jul 2, 2018 at 19:09
  • 1
    It continuously watches the file for appended data and writes the new content to the console
    – ckarras
    Jul 3, 2018 at 20:06
  • wait what is the sample use
    – Jovylle
    Dec 1, 2021 at 5:28
27

I use Notepad++ as my default text editor on all my systems, and it has the nice bonus of having this built-in - just go Plugins -> Document Monitor -> Start to monitor. You can also use File -> Reload from disk to manually reload it.

4
  • 5
    +1 Wow, I have been using Notepad++ for awhile but didn't know about this functionality. thanks.
    – dance2die
    Apr 30, 2009 at 23:57
  • 1
    does this still exist, I don't see it in version 5.9.8 that I just downloaded.
    – Scott
    Jan 20, 2012 at 17:07
  • 1
    @Scott can be downloaded as a plugin sourceforge.net/projects/npp-plugins/files/DocMonitor
    – Fishcake
    May 11, 2012 at 10:18
  • +1 from me too. I love Notepad++ but didn't even think of looking for a plugin. Bye bye BareTail.
    – Fishcake
    May 11, 2012 at 10:19
23

You don't mention which platform you're using, but on Unix-like systems the tail command does this:

tail -f /var/log/messages

In fact there are implementations of tail for Windows also (eg. unxutils).

0
22

Actually, Log-Expert does what you want, plus a lot of nice feature

Features for Log-Exprt

6
  • yeah, this solution rocks. Better than notepad++, which only updates every 3 seconds, and is a bit flaky.
    – Jacko
    Mar 10, 2011 at 19:52
  • Plus its free :) Apr 7, 2015 at 19:15
  • @VonC, Any disclaimers?
    – Pacerier
    Aug 25, 2015 at 10:29
  • @Pacerier none that I can think of. But that was 6 years ago.
    – VonC
    Aug 25, 2015 at 10:33
  • +1 to this answer. LogExpert is by far the best free log monitoring tool. Much better than Baretail (which doesn't even have search in free version).
    – montonero
    Feb 26, 2021 at 7:30
21

If windows is your thing you could try Tail for Win32.

edit: Another alternative I just found is TailXP. It's free, but not opensource. Looks ok from the description but I haven't tried it.

3
  • The advanced features feel a little buggy but for simply tailing the file, it's perfect. Apr 30, 2009 at 23:10
  • 2
    Because of "tail" stuff people were mentioning, I found something called "BareTail" - baremetalsoft.com/baretail So far it seems to be doing what I wanted. But I am open for more suggestions.
    – dance2die
    Apr 30, 2009 at 23:34
  • That one looks nice to know about too. Apr 30, 2009 at 23:40
5

I have had good luck with the windows program mtail. It does a very nice job of monitoring an active log. You can configure quite a few options but in general I have found the defaults work very well.

mtail

1
  • Great! I didn't get to run into this one.
    – dance2die
    May 3, 2009 at 0:23
4

Like tail -f file.log?

4
  • But doesn't this mean I have to be running the command constantly?
    – dance2die
    Apr 30, 2009 at 23:20
  • No, the tail command will wait after printing the last line, and when the file is updated/appended it will print the new line(s) and wait again. Instead of plain tail you might try vanheusden.com/multitail.
    – hlovdal
    Apr 30, 2009 at 23:26
  • He also said for the Windows OS.
    – Pure.Krome
    May 1, 2009 at 0:02
  • 4
    Not when I answered, he hadn't. May 1, 2009 at 0:32
3

"tail -f logname"?

2
  • He edited his post to say it's for Windows OS only.
    – Pure.Krome
    May 1, 2009 at 0:02
  • 1
    There are plenty of versions of tail for Windows, including in cygwin. May 1, 2009 at 0:13
3

I love the Kiwi Log Viewer. They were just bought out by Solarwinds -- I assume the product is still for sale (or maybe they're giving it away for free now? They're giving away a few other Kiwi products).

2
2

If you install Cygwin on your Windows machine, you can run tail

1
  • Hmm. Cygwin. I haven't played around with that for years...
    – dance2die
    May 3, 2009 at 1:49
2

I typically do this with TextPad. It has the option to monitor that a file has been modified. It is an option to either automatically update the window or to prompt you whether or not you want to reload the file.

1
  • It looks like TextPad has a the same capability as NotePad++'s Document Monitor plugin
    – dance2die
    May 3, 2009 at 0:26
1

If you're using eclipse there's a fully sick plugin called Log Watcher

http://graysky.sourceforge.net/

It supports multiple files, plus color highlighting.

Not the answer you're looking for? Browse other questions tagged .