I think you’ll agree that viewing a log file in Notepad is very cumbersome, impractical and nearly impossible.
The Linux community uses “tail” to follow a log file’s output.
1 |
tail -f output.txt |
On Windows however, we need a little help. So today I’ll share with you 3 easy ways to tail a log in Windows.
Powershell
Modern Windows Operating Systems all have Powershell included. To tail a log file, open Powershell and navigate to the file you’d like to tail.
Then type:
1 |
Get-Content -Wait output.log |
Notepad++
Ah, don’t we know it? Notepad++ is the Swiss Army knife of any developer. And this is how we follow a tail with Npp. Open the log file and click the Monitoring icon.
TailBlazer
If you often need to filter or highlight the log output on the fly, then TailBlazer is the way to go. See https://github.com/RolandPheasant/TailBlazer
And now we have 3 ways to tail a log file in Windows. No more excuses.
Happy debugging!
I’ve been using UnxUtils, native Windows ports of many Unix tools, for years. It includes tail so I’ve always used tail -f but like the idea of using Powershell as I’m trying to use that more and more.