59

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

Rory
  • 482
  • 5
  • 12
  • 22
dance2die
  • 1,961
  • 7
  • 31
  • 40
  • Which IDE are you using? – chickeninabiscuit May 08 '09 at 06:28
  • @Sung, Do you need readonly or editable? – Pacerier Aug 25 '15 at 10:29
  • Why was this question marked off-topic?!? – MikeSchinkel Jan 09 '22 at 03:33
  • @MikeSchinkel Folks who closed marked it as "they tend to become obsolete quickly." It's a very old question so probably so. – dance2die Jan 10 '22 at 16:27
  • 1
    @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 – MikeSchinkel Jan 11 '22 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 '22 at 01:40
  • 1
    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 https://serverfault.com/help/on-topic – Rory Jan 16 '22 at 20:41

13 Answers13

37

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

type -wait
ckarras
  • 471
  • 1
  • 4
  • 3
  • 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 '09 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 09 '12 at 13:51
  • For those of us unfamiliar with `tail -f`, what does `type -wait` do? – Stevoisiak Jul 02 '18 at 19:09
  • 1
    It continuously watches the file for appended data and writes the new content to the console – ckarras Jul 03 '18 at 20:06
  • wait what is the sample use – Jovylle Dec 01 '21 at 05: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.

Zack Elan
  • 370
  • 3
  • 5
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).

Greg Hewgill
  • 6,749
  • 3
  • 29
  • 26
22

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

Features for Log-Exprt

montonero
  • 158
  • 6
VonC
  • 2,653
  • 5
  • 29
  • 48
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.

Jorge Alves
  • 400
  • 2
  • 7
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)
Rob Thomas
  • 236
  • 2
  • 4
  • 1
    This is what (BareTail Free version) I settled with for now. Thanks Rob – dance2die Jul 19 '09 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](https://superuser.com/a/315381/458103). The program [glogg](http://glogg.bonnefon.org/description.html) despite being simpler than this, handles big files with much better performance, was updated just last year, is open source (https://github.com/nickbnf/glogg) and has support to Windows, Linux and Max OSX. – user Jan 25 '18 at 15:12
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

John Dyer
  • 725
  • 1
  • 10
  • 12
4

Like tail -f file.log?

Sophie Alpert
  • 1,639
  • 1
  • 12
  • 16
3

"tail -f logname"?

Paul Tomblin
  • 5,217
  • 1
  • 27
  • 39
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).

DougN
  • 670
  • 2
  • 7
  • 16
  • 1
    Would you post link to Kiwi Log Viewer? I am not sure if this one I found is the one you are referring to: http://www.kiwisyslog.com/kiwi-log-viewer-overview/ – dance2die May 03 '09 at 00:22
  • Yeah, that's the one -- kiwisyslog.com – DougN May 04 '09 at 15:35
2

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

Gary Richardson
  • 1,767
  • 3
  • 19
  • 21
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.

bruceatk
  • 121
  • 1
  • 4
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.

chickeninabiscuit
  • 1,094
  • 6
  • 17
  • 33