Log viewer is a very simple and easy to use real time log file viewer. All that is required is to open a text based log file, this program will check for any changes to the file and automatically display them on the screen.
In the settings part, you can find the highlight and icon options. With these options, you can determine the line color, backcolor or display icon for the criteria that you mentioned.
Log viewer displays only the last 100 (optional) lines for the log. This setting can be shown in the Log windows and can be incremented. For the developers opacity settings is included for those who want to see transparent Log Window. In the project, you will find directory watcher that watches directory and files for the changing. In this part, you can tail the changed files and you can open with one click.
This is the first version of the Log viewer and written in half a day. If you don't mind, please give feedback to improve.
There are too many utilities like this one. BUT I just want to share this open source - advertisement free utility for free. If you like it, just use it and suggest some pretty options.
Many of the applications write their log in a text based file. In all of my application, every step or critical function has a log option and I view these logs in runtime in test or real time working. I created this component for just that purpose.
Using the Code
Log Viewer using threads for viewing files. You can open multiple files with drag drop.
Dim s_SatirSayisi As Long = 0
Dim a As New System.IO.FileInfo(Dosya.DosyaTamYol)
If Not (a.Exists) Then
If Dosya.DosyaSonboyut <> a.Length Then
If Dosya.DosyaSonboyut > a.Length Then
Dosya.DosyaSonboyut = 0
Dim veri() As String = DosyaOku(Dosya.DosyaTamYol, Dosya.DosyaSonboyut)
Dosya.DosyaSonboyut = a.Length
s_SatirSayisi = s_SatirSayisi + veri.Length
Loop While Cls_Aktif
This thread is the main function that views the log files.
Points of Interest
DataGridView is used for viewing the logs for each line with highlight and icon option. With this option, you can watch the file easily and I uninstall other log viewers. ;)
In this project, you will find:
- Open and Read File
- File System Watcher Usage
- Registry Usage
- XML Usage
- .NET Docking Library for Windows Forms used for tab views (
- XML+ Library (by Seyfettin Öztürk)
- Find option (waiting)
- Windows Event Log Viewing (Log Number After Max record is not changing, will be fixed)
- Multi Language Support (GUI, only in English now)