tags:

views:

191

answers:

7

I am debugging a new application that is crashing. I want to watch the messages as they are being written to the log. What command should I use?

+10  A: 

If you're on a unixy system and your log is a file, you want tail -f <filename>.

If you're on a Windows system, there are ports of tail available (hat tip - Dave Webb).

Dominic Rodger
thanks Dominic.
Kombucha
There are various ports of tail available for Windows systems. For example - http://gnuwin32.sourceforge.net/packages/coreutils.htm
Dave Webb
Similarly, I've had great luck on Windows with http://www.baremetalsoft.com/baretail/
JeffH
A: 

If you prefer GUI tools, jEdit has a Log Viewer plugin that may do what you need.

Andy Balaam
A: 

To add to Dominic's answer, if you're on a Windowsy system, you can get Cygwin32, which will give you a tail command for Windows. (And a bunch of other good stuff...)

Aric TenEyck
it's preferable to get msys, as they are native windows ports.
Pod
A: 
$ tail -f log_file_name &

This would keep running in the background.

Barun
+1  A: 

If you are on Mac OS X, run Console (in /Applications/Utilities). It is a nice GUI for viewing and searching logs.

MtnViewMark
+1  A: 

Try using baretail

It's a small executable that doesn't need to be installed and runs on Windows. It has a tabbed interface so you can have several different files open at once. You can also color code certain keywords in the logs. All in all, a very handy tool.

Neil
A: 

Install cygwin and utilities on Windows and run

tail -f ./logfile

Cygwin gives you a unix like interface on Windows and provides you with most of the utilities as present on unix

Devil Jin