 |
|
 |
Hi Amlet/Thanks for ur nice solution for viewing log files/
I need to use it in my dialog-based project , how can i use ur classes in my project/
Thanks in advanced
|
|
|
|
 |
|
 |
Nusha24,
ABLogfile has been designed as a complete project, i don't think it possible to split it up into components that can be used in other projects It is also designed around the Doc/View arciteture and it would need quite a bit of rewriting to use it in a Dialog based window.
There are some newer versions available on my website http://www.amleth.com[^], you are welcome to include ABLogFile with your project distribution if you wish.
Please let me know if i can be of any other assistance.
Regards
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
A new version is available at the following link ABLogFile
I have called it a beta version as so much of the orgininal code has changed, although it hase been tested extensivily
I will update the article shortly.
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
Hi,
Just tested your latest version. This version does not allow loading of file with size greater than 1mb unless the file resides in the local machine.
I've tried two methods in accessing the remote file:
1) mapped drive
2) directly specify the network path
Both methods will cause file loading to hang regardless of whether Poll File or Windows Notification is used for File Change Check.
Regards,
Hilary
|
|
|
|
 |
|
 |
I'm in the process of completely re-writing this project.
It should be finished in the next couple of days.
I'll let you know when it is done.
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
http://www.baremetalsoft.com/baretail/
Also, it doesn't have the limitation of size in-memory...
What is missing (in both viewers) is find/replace.
BTW: just find/replace tool is baregrep from the above company
(I'm underelated to Baremetalsoft. simply found the tool via Google search.)
|
|
|
|
 |
|
 |
New version available
http://www.amleth.com/ablogfile/ablogfile.html[^]
Ver 1.0.2.0 2004-05-27
Added. Option for displaying Full Path and LastModified time in window caption.
Fixed. Opening of file that may be locked by another process
Ver 1.0.1.0 2004-05-22
Added. option to poll file for changes, or to use windows notifications to check for file changes
Ver 1.0.0.2 2004-05-20
Fixed. Buffer overflow when a reloading a large file
Please let me know of any changes that you would like to appear in the next version.
Amleth Ojalen
Regards,
ABLogFile
ABBaseCalc
ABHotKeys
|
|
|
|
 |
|
 |
Hi Amleth,
I tried your last version and it works just perfect for me, thanks.
When thinking about improvements, it'd be nice to have possibility to stop/start the logwindow update. I'm still not so good as people in the Matrix movie to see what's going on from characters running on the sreen.
As somebody mentioned before it'd be nice to have filters. Something like when you run 'tail -f foo | grep search_string' on linux to see only some messages. (Useful when more apps are loging to the same file and you want to see only one of them)
'Find' feature is also nice to have. But I'm not shure why anybody (see dtr2's post) needs 'replace'. In my opinion it breaks the philosophy of "viewer". But maybe it's only lack of my imagination.
Anyway thanks for your app again, it's very helpful for me and I'm looking forward to see future verions.
Regards,
Jaroslav
|
|
|
|
 |
|
 |
An interesting feature for me could be : a kind of alert and/or highlight for some special string. For example I add in setting : "modem doesn't respond", and this string appear with yellow background in the texte and a button "Goto" become red.
Sylvain
|
|
|
|
 |
|
 |
I tried your tool and found out several problems:
1) I have a process that writes to a file and keeps this file opened all the time. When I try to load the file into your tool, it always ends up with sharing violation error. Other apps (like notepad) don't have any problem to open it.
2) Try to create new empty file, open it with your app and then double click on empty window... and you will end up with memory access error.
Thanks for sharing anyway.
|
|
|
|
 |
|
 |
I'm looking in the sharing violation, a number of people have commented on this. I hope to post a solution in the next couple of days.
I' will also fix the problem with an empty file. Didn't think of this problem.;)
Any other things you would like to see in the program while i'm updating it?
Regards,
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
Thanks for your fast reply. This sharing violation bug prevents me to use it at all, so I'm not able to say right now what else would be good to have in the app.
But I'm looking forward to try it again later.
Lucky bugs-hunting,
Jaroslav
|
|
|
|
 |
|
 |
Nice tool
I have a suggestion for you regarding the UI of the program.
When openning several files and the tabs do not fit one line some tabs are placed at the top while others are at the bottom. When selecting a tab at the top it moves to the bottom. This confuses... I think it will be better to always use one line for displaying the tabs and use scrolling if necessary. Also the part of tab title may be omitted. This will make more tabs visible at a time.
|
|
|
|
 |
|
 |
mm, Tabs. The tabs aren't my source code, I borrowed them from another article on Code Project. I'll see what i can do, but i can't promise anything.
Regards,
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
A typical logfileviewer will also be used to view tracefiles and so on. Trace and logfiles tend to be very large, especially when you are trying to search for problems that occur only once in a while.
In my (humble) opinion, this logfileviewer lacks functionallity at several places:
- It does not run in 'idle' time, therefore it will interfere with the running processes on a system.
- It cannot cope with very large files, 500 Mb and higher. I tried it with a 900 Mb file and had to reboot my entire system . The reason for this is that it reads the entire file in memory and starts reading at the beginning of the file.
- It lacks filtering.
I have written a logfileviewer that displays the end of a file instantly (regardless of the size of the file (up to 4 Gb)) and immediately starts tracking any changes in the file. It will load the rest of the file in a different thread (in the background) without interfering with the userinterface.
It also saves a huge ammount of memory since I only store the locations of the 'endline' characters in memory (Array). This prevents running out of memory.
Unfortunatly I cannot give away the source since it is property of my company. What I can do is help you out with some of the problems we encountered and give away some codesnippets (and the concept) if you like.
Don't misunderstand me, I am not critisizing your code, just helping you to improve it.
Best regards,
Peter.
|
|
|
|
 |
|
 |
I value your Humble Opinion.
I have made changes already with regards to the Idle time, I was previously using Timers, i now use Window notifications for checking when a file changes, but the artical hasn't been updated yet.
I originally wrote it for my own use, and i only had small log files to open < 2Mb. I've been palnning to make some changes to the way that the log file gets read. I was going to open it in chunks, thus only requiring 100kb or so of memory.
I don't get waht you mean by filtering, do you mean hiding certain lines if they start with certain characters, or certain lines if the contain certain characters? If this is useful i can add it without any problems.
I understand about your source code, I have a number of things like that.
Please let me know of any other suggestions.
Amleth Ojalen
ABLogFile - a realtime log viewer, a work in progress
ABBaseCalc - a simple base converter
ABHotKeys - you don't know the functionality your missing out on till you use it.
|
|
|
|
 |
|
 |
There are just some longstanding functions in unix that MS needs to replicate. The tail program is one of them. Cygwin has tail, but apparently there's something hosed between it and SMB.
|
|
|
|
 |
|
 |
Nice program. Could you add an option to turn off whatever it is that causes the program to use more than 6% of the CPU. I think it might be the timer, you could notify when there is a change otherwise, sit quietly. Something like that.
Bydia
|
|
|
|
 |
|
 |
Thanks,
I will have a look at doing something about the CPU usage. Currently it checks the file size every 100ms, I don't know any other way of doing it.
What i was thinking of doing something like, when polling if it hasn't changed then double the time to the next poll interval. I will also add a setting to set the poll interval.
I will update the Code in the next day or so.
Regards
Amleth Ojalen
ABLogFile
ABBaseCalc
ABHotKeys
|
|
|
|
 |
|
 |
If you could use the FileSystemWatch in .Net it could fire events when the file changes. Then you don't need to poll.
Bydia
|
|
|
|
 |
|
 |
Yep, I'm looking into FileSystemWatch and FindFirstChangeNotification. I'll just have to check what versions of windows it is supported on, and weather or not is is supported on Network paths.
I'll Probably put a switch to used the different types. I'll email you when i have changed it.
Amleth Ojalen
ABLogFile
ABBaseCalc
ABHotKeys
|
|
|
|
 |
|
 |
Hi.
Nice tool.
See also the tracetool utility ( http://www.codeproject.com/csharp/TraceTool.asp )
It's an another log viewer, with many other fonctions.
Thierry
|
|
|
|
 |
|
 |
Thanks. I looked at your tool, it does have many more features, but for my purpose i just needed something small and simple. I will shortly be adding support for WinNT events.
Regards,
Amleth Ojalen
ABLogFile
ABBaseCalc
ABHotKeys
|
|
|
|
 |
|
 |
I downloaded the executable and tested it. I pointed to a txt file on the desktop, then I began adding lines to the txt file using an editor. I saved the file every few files.
At first the log viewer was doing fine, but then I got a message that it could no longer find the log file, so I re-loaded the log file into the viewer and it then truncated the first 3-4 characters from the front of every line.
|
|
|
|
 |
|
 |
Could you please send me a copy of the file you had a problem with and i'll see if i can replicate it. You can send it to amleth@ameth.com
Amleth Ojalen
ABLogFile
ABBaseCalc
ABHotKeys
|
|
|
|
 |