Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Parse Log File As Written

by alanonymous (Sexton)
on Sep 24, 2007 at 12:39 UTC ( [id://640710]=note: print w/replies, xml ) Need Help??


in reply to Parse Log File As Written

VC, that looks to be almost exactly what I was looking for. After work today I'll see what I can do as far as actually getting the code to work for my application and really start to play around with it.

Andreas, unfortunately I cannot control the program creating the logs in any way. It would have to be some type of script just monitoring the log file itself.

Thanks a bunch for the responses guys.

-Alan

Replies are listed 'Best First'.
Re^2: Parse Log File As Written
by duff (Parson) on Sep 24, 2007 at 13:40 UTC

    Does your program need to do other work while waiting for the logfile to update? If not, I think you really want esper's suggestion of File::Tail.

      No, the script wouldn't need to do anything while it is waiting for an update to the log file. My only concern is if the script performs an action based on an update to the log, but the action is still being executed while the next update occurs. Will the File::Tail execute multiple instances of the parsing conditions if updates occur too frequently? So if two updates occur at almost the same exact time, but it takes ~100ms for the execution of the parsing code and other actions, will that cause a problem?

      The File::Tail does seem ideal IF it can handle fast updates.

      Thanks for all the advice! Much appreciated!

      -Alan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://640710]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found