Siegfried Heintze wrote:
> I have a couple of batch jobs that run every couple of hours. They scrape
> web sites and populate an MSAccess database.
> 
> I would like to write a GUI to monitor them. Presently all my diagnostic
> print statements just scroll by and they are very hard to read.
> 
> I would not want the batch processes to hang just because the GUI logger was
> not being run. 
>

Right, you should keep the two processes separated.

> I was thinking writing a GUI client that listens for UDP packets and
> displays the results using wxWindows -- maybe one tabbed pane per server
> process. Each tabbed pain would allow me to view the progress of each
> process.
> 

Yikes, sounds like over kill for such a simple task.

> What would be the best way to take all these diagnostic print statements
> that are spewing out lots of text and send it somewhere?
> 
> (1) I did a search on CPAN and found there were several matches to Logging.
> They all looked very special purpose. Am I mistake or perhaps I need to
> search CPAN with a different keyword?
> 

Log::Log4perl is excellent and has an incredible array of functionality.

> (2) Regardless of whether CPAN has a module, I'm kinda curious: 
>   (2a) is there a way to serialize a hash table and send it thru a socket?
> (and of course, deserialize on the other end)?

Sure there are a bunch, not the least of which is Storable.

>   (2b) What about RPC -- I see from Advanced perl program there is such an
> implementation for perl. Would that be an effective logger? I don't think I
> want guaranteed delivery, however. I would like the option of not running
> the client.

Again sounds like overkill to me. Why not just have the app log to a
flat file. Then write whatever kinds of mechanisms you want to read,
listen, parse that file however is appropriate. 'tail -f' might be all
you would need. Start out small, then build on later. Leave the logging
as part of the app, but do it simply; it shouldn't form the core of what
you are doing. Leave log viewing and handling to a separate suite of
apps, scripts, whatever.

HTH,

http://danconia.org

> 
> Thanks,
> Siegfried
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to