|The stupid question is the question not asked|
Re^3: View content of Log::Log4perl log file while logger is runningby taint (Chaplain)
|on Dec 08, 2013 at 11:08 UTC||Need Help??|
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?
Hey. I'm not completely useless. I can be used as a bad example.