Ever wanted to just type 'tail -f error_log' on Windows?
Envious of your Unix friends who can track changes to a file, in real time, as they happen?
Well, now with the Objektiv Tail for Win32, you'll be happily monitoring your log files like you've never done before.
What's even better, you can track several files all at the same time with the patented "Multiple Document Interface"TM technology, with each file having its own, fabulous window.
What is it?
Tail for Win32 is a Windows version of the Unix 'tail' utility. It can be used to monitor changes to a text file in real time - ideal for watching error logs.
The program was written in C++ using MFC, and uses Win32 file change notifications to monitor when a file changes.
The application uses a 'plug-in' architecture, under which all changes are passed through external DLLs that can perform various functionality.
The first plug-in is an SMTP filter. This DLL sends emails via SMTP when a keyword is found in the file being monitored.
As well as monitoring files in real time, you can also specify a set of 'keywords' that tail looks out for. When a keyword is encountered, it can be 'syntax' highlighted in a number of optional colors, and can also fire external plug-ins. This is all configurable on the fly.
The program can also be told to ignore any lines that do not contain the keywords specified; only showing 'hot' lines.
So How Does it Work?
At the core of the application is the Win32 file notification API. This API fires an event whenever a file changes in a directory. Using this event, we can track whenever changes are made to a particular file.
For each file that is monitored, a thread is set up that blocks on the firing of the file notification. This makes the application extremely efficient - it only ever does anything when a file actually changes.
This is all written in MFC under Visual Studio 6. But compiles quite happily under .NET and .NET 2003.
The following controls are used to a greater or lesser degree:
RichText control -version 2.0 to allow background shading
ListView control - with checkboxes and combo controls
Tree control - subclassed to handle double-clicks and right-clicks
Can I Help?
The project is hosted on SourceForge, so CVS access is all part of the deal. If you think you'd like to help and can contribute even a few minutes of your time, please do get in touch!
The project homepage is: here and the CVS repository is updated at least daily, so please do check back on a regular basis.
Tail is released under the GPL. In a nutshell, you can do whatever you like with the source, so long as if you pass on the application for free or for profit, you must also pass on the source.
- 4.2.7: Tally window fix. Added background and highlight colour dialogs. Slight re-jig of the object model.
- 4.2.6: Fixed a couple of bugs with the Tally window and the Keyword configuration window.