Register to post in forums, or Log in to your existing account
 

Post new topic  Reply to topic     Home » Forums » zApp Developers
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Sun Aug 07, 2005 9:55 pm   

A zApp Challenge
 
Small challenge for anyone some free time:

Create a program that will act as a log viewer for server logs, displaying a ListBox for each line, and continously adding lines to the end of the list, similar to the funcionality of tail -f on linux.

The program would have other features as well, including selective formating depending on filters (So for instance, you add a filter saying any line that has the word 'ERROR' in it, will have a red background and black text, etc etc) as well as searching.

I've almost completed a similar project in Java in about 2 days, and I want to see if someone can do it in zApp since it seems like a zApp-worthy utility.
Reply with quote
Darker
GURU


Joined: 24 Sep 2000
Posts: 1237
Location: USA

PostPosted: Mon Aug 08, 2005 3:40 pm   
 
Have you seen flogviewer? http://www.flogviewer.com

Just in the interest of finding good tools for a job.
_________________
Darker
New and Improved, for your Safety.
Reply with quote
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Mon Aug 08, 2005 4:27 pm   
 
Yeh thats what I'm talking about. I dont know how I missed tha tone..but hey, why not write one in zApp anyhow?
Reply with quote
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Mon Aug 08, 2005 5:21 pm   
 
Okay, I'm going to do something similar to flogviewer in zApp but I can't make it a priority. So my efforts on it will be split up over the next week. My main motivation for this is because I think the app will be very useful for our developers here and because I want to prove the usefullness of zApp. They always want to be able to modify the code so they'll need to buy some licenses (they always buy mutiple.)
Reply with quote
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Mon Aug 08, 2005 6:18 pm   
 
If you want ideas for the project theNerd, I'm willing to throw out several. Like I said, I developed something similar (it's almost done) in Java, but I do not believe Java to be the best tool for this project...or rather, I think it can be done in zApp, so why not.

I would do it myself only I don't have enough knowledge of the scripting languages to make use of threads (which would be required) nor would I know how to create an indexed structure to store all the lines.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23377
Location: Colorado, USA

PostPosted: Mon Aug 08, 2005 6:57 pm   
 
Just thinking out-loud, but it seems like this would be trivial in zApp just using a normal MEMO component, rather than trying to use a list box. List boxes don't have very fancy formatting, whereas the MEMO component could have extremely rich formatting, and it already has a method to add a line to the end and keep the control scrolled to the end. I don't think you'd need threads or indexes or anything, but maybe I'm missing something. The searching in the Memo control isn't indexed, so I don't know how fast it is and how this would work for huge files, but it's worth a try.

For the filters, just do a regular expression test against a list of filters before adding the line to the memo to determine the formatting values.

Seems like just a couple-hour job, but I'll let someone else play with this so I don't get distracted Wink
Reply with quote
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Mon Aug 08, 2005 9:53 pm   
 
Well the idea behind using a list is that you can select a line to highlight it. Generally server logs are 1 line affairs. And the idea of the threads is that you would want to constantly refresh the file to view the latest log output.
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Wed Aug 10, 2005 5:46 am   
 
A listbox sounds kludgy. If you want to be able to select just lines, then make it set the current selection, when clicking in the memo, to the current line. (Assuming figuring out where the cursor is isnt hard). OTOH it would also be nice to be able to select parts of lines, for copying&pasting elsewhere..

Lady C.
Reply with quote
Krule
Adept


Joined: 12 Nov 2000
Posts: 268
Location: Canada

PostPosted: Wed Aug 10, 2005 10:20 am   
 
Well, I'm using what it appears most people who write similar apps go (There are a few, but none that did what I wanted)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zApp Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net