Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to monitor a text file in realtime [closed]

For debugging purposes in a somewhat closed system, I have to output text to a file.

Does anyone know of a tool that runs on windows (console based or not) that detects changes to a file and outputs them in real-time?

like image 431
pbreault Avatar asked Aug 20 '08 19:08

pbreault


People also ask

How can you check in real time for changes made to a file?

- Go to: Settings → Preferences → MISC. → and here in the section "File Status Auto-Detection", make sure to select all three checkboxes ([✓] Enable, [✓] Update silently, [✓] Scroll to the last line after update). ...and you will see the file being updated in real time, as new log entries are written to it!

How do I view logs in Notepad ++?

Open Log File. Click Plugins > Document Monitor > Start Monitoring.


2 Answers

I like tools that will perform more than one task, Notepad++ is a great notepad replacement and has a Document Monitor plugin (installs with standard msi) that works great. It also is portable so you can have it on a thumb drive for use anywhere.

For a command line option, PowerShell (which is really a new command line) has a great feature already mentioned.

Get-Content someFile.txt -wait 

But you can also filter at the command line using a regular expression

Get-Content web.log -wait | where { $_ -match "ERROR" } 
like image 73
Mike Schall Avatar answered Sep 22 '22 11:09

Mike Schall


  • Tail for Win32
  • Apache Chainsaw - used this with log4net logs, may require file to be in a certain format
like image 36
Jon Galloway Avatar answered Sep 20 '22 11:09

Jon Galloway