Tuesday, March 31, 2009

WinLogTail - freeware log viewer, monitor and analyzer

Another great little tool to follow up (large) log files: WinLogTail. Very nice, but compared to BareTail, we are still  missing a feature: the tabbed interface to easily open and monitor many log files at once.

Features of WinLogTail:

  • fast open and browse log files, regardless of file size
  • monitor log file for changes live - as new log lines are appended, they are instantly visible in WinLogTail
  • "rules" for highlighting, searching and alerting
  • rules use either regular expressions or simplified order-insensitive logical patterns
  • highlighting: specify font style, foreground and background color for any log line according to its content (for example, red color for lines with word "error")
  • searching: output certain lines to "filtered view" (also updated live)
  • alerting: you can send WinLogTail to background, and it will flash window or play sound as soon as specific line is appended to the log file
  • context scrolling: click a line in filtered view, and the main view will scroll to the relevant position
  • can define multiple rules at once, modify, delete, rearrange, deactivate etc
  • import and export rules
  • command-line options to quickly select file, rules and operation mode
  • copy to clipboard or export to file - in plain text, RTF or HTML formats
  • small executable file with no installation and external dependencies
  • free

DownloadDocumentationScreenshotHome website

Friday, March 27, 2009

BareTail easy (scripted) usage

We use BareTail a lot, since it’s so fast and easy to work with, even on very large log files.

To make is easier for ourselves, we created some (batch) scripts to quickly open our log files using BareTail.

Our template for such a batch script is shown below, maybe it can be useful for others:

@echo off
@rem example to connect to network share
@net use "\\<ip-adres>" /d
@net use "\\<ip-adres>" /USER:<username> "<password>"
rem add the full path to the baretail executable as a system variable
rem go to Start -> Run -> control Sysdm.cpl,,3 -> Environment variables -> new -> name: baretail, value: C:\Program Files\BareTail\baretail.exe
rem or use 'setx baretail C:\Program Files\BareTail\baretail.exe'
rem if the env variable is not set, the default value will be used. 
@if "%baretail%" =="" set baretail=C:\Program Files\BareTail\baretail.exe
rem add all log files to be opened in list below, delimited with a space
@set files=\\<ip-adres>\<path-to-log-file> \\<ip-adres>\<path-to-log-file> 
@start "baretail" "%baretail%" %files%
@echo on


To easily tail all log files in the current directory:



setlocal ENABLEDELAYEDEXPANSION
if "%baretail%" =="" set baretail=C:\Program Files\BareTail\baretail.exe
SET FILES=
for /f "delims=" %%i in ('dir /a-d/s/b "*.log"') do SET FILES=!FILES! "%%i"
start "tail" "%baretail%" %files%


Easily clear up all log files in the current directory by moving them into a WinRAR archive:



@echo off
SET WIN_RAR_APP=c:\program files\winrar\rar.exe
SET BACKUP_LOGS_DIR=backup_logs
setlocal ENABLEDELAYEDEXPANSION
SET FILES=
for /f "delims=" %%i in ('dir /a-d/s/b "*.log"') do SET FILES=!FILES! "%%i"
mkdir "%BACKUP_LOGS_DIR%"
SET Today=%Date: =.%
SET Today=%Today:~-4%.%Date:~-7,2%.%Date:~-10,2%
SET Now=%Time: =0%
SET Now=%Now::=.%
set archivename="logs_%Today%-%Now%.rar"
set archivename="%archivename: =%"
"%WIN_RAR_APP%" m "%BACKUP_LOGS_DIR%\%archivename%" %files%


Update 26/04/2009: added scripts for logs in current directory.

Windows File Association fixes

On Windows it can happen that some (system) files can not be opened anymore with their default build in application. Such can happen for example after a failed installation of some software application. To easily fix the default file associations, one could use the registry files provided on the site of Doug Knox (for Windows XP).

He provides registry files to fix following file types:

If your EXE file associations are corrupted, it can be difficult to open REGEDIT, or to even import REG files.  To work around this, press CTRL-ALT-DEL and open Task Manager.  Once there, click File, then hold down the CTRL key and click New Task (Run).  This will open a Command Prompt window.  Enter REGEDIT.EXE and press Enter.