Well. I seem to be having a bit of difficulty following you completely.

If I understand you correctly. You'd be likening it to opening an already created log file in your favorite editor. Then, refreshing the editor's view. Will show any additions/subtractions that may have occurred. Yes?

If that's the case, you should be able to open an already created log file. Providing that the system is not already using it. In other words, as I stated before; if your system is either opening, writing, or otherwise, has it open for processing. You will NOT be able to open it, UNTIL the system has finished closing it. That's the way it works -- and for good reason. That's how you prevent data corruption.

If you can get handle on the file, before the system does. You can maintain that handle, and refresh the view of that file, to see if there have been any changes. But to do that. You will need to create temp variable, that holds your current view. Thereby releasing the original file handle for other processes (whatever process is logging to log file you're viewing). So that, like you're viewing the file. They can write to it.

Is this helping. Do you understand better how the whole process works? Did I understand your question correctly?

Best wishes.

--Chris

Hey. I'm not completely useless. I can be used as a bad example.

In reply to Re^3: View content of Log::Log4perl log file while logger is running by taint
in thread View content of Log::Log4perl log file while logger is running by iseif

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.