gurralas has asked for the wisdom of the Perl Monks concerning the following question:

Hi friends, I am facing trouble in reading the information from the EventLog using Read method of Win32::EventLog perl module. I am facing this problem, when the EventLog is having huge amount of entries. If I clear out the EventLog and then start reading the new entries, then it is working fine. Please let me know, what could be the reason for it. Thanks in advance. Regards D-SAT
  • Comment on Problem in reading Windows XP EventLog (if it is huge).

Replies are listed 'Best First'.
Re: Problem in reading Windows XP EventLog (if it is huge).
by GrandFather (Saint) on Aug 24, 2005 at 11:34 UTC

    You don't say what your problem actually is. Does it take a long time, does it crash or is there some other problem?

    It may help if you included the code fragment that you are using to read the EventLog.


    Perl is Huffman encoded by design.
Re: Problem in reading Windows XP EventLog (if it is huge).
by thor (Priest) on Aug 24, 2005 at 11:36 UTC
    Care to post a snippet of code that fails in the manner in which you describe? Sometimes, it's an algorithm error as opposed to a module error...(i.e. if you try to put all of the events in memory as opposed to iterating over the set)

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re: Problem in reading Windows XP EventLog (if it is huge).
by puploki (Hermit) on Aug 24, 2005 at 11:51 UTC

    You may want to look at using dumpel to pre-process/pre-filter the events and then drop them out into a text file for you to process in Perl.

    It's very, very, fast at doing its job, so it allows you to process the text quickly in Perl (which is, after all, what it's there for :) )