Hi Scott, As I explained earlier, the problem was arising when we request for updates through the protocol (say http) when there are no actual updates of the log file. So the solution was to avoid making the request rac.getInputStream() when there are no updates in the log file after the last read. So Mario suggested that we can use the rac.getContent().getSize() method to check the file size. So I stored the previous file size and checked the new file size and made the call if the file has grown. And also it need a fileObject.refresh() call before checking the file size. This solved my problem and also it is more efficient than requesting for updates every time. I made new patches (which are more clear and smaller than earlier ones :-) ) and attached to the bug 42654. Please apply and check. Sorry for the late reply. I didn't have access for 2 days.
Thanks, ~Isuru On 6/15/07, Scott Deboy <[EMAIL PROTECTED]> wrote:
Can you describe the resolution? Thanks Scott Deboy *Principal Engineer** COMOTIV SYSTEMS **111 SW Columbia Street Ste. 950** Portland, OR 97201 Office: 503.224.7496 Direct Line: 503.821.6482 Cell: 503.997.1367 Fax: 503.222.0185 [EMAIL PROTECTED] **www.comotivsystems.com* ------------------------------ *From:* Isuru Suriarachchi [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 11:09 AM *To:* Log4J Developers List *Subject:* Re: Issue in fixing 'tailing' in Chainsaw Hi, I could overcome the problem I explained two days back, with the help of Mario (VFS leader). Now it's working without any trouble. I updated the bug with two new patches. So please apply it and check whether everything is fine. Think my first task is now completed. :-) Thanks, ~Isuru On 6/14/07, *Scott Deboy* <[EMAIL PROTECTED]> wrote: I'll look at the patches..it could be some network timeout that needs to be set higher. For future reference, here's a link to the msg on the commons-dev mailing list: http://marc.info/?l=jakarta-commons-dev&m=118180358305021&w=2 Scott Deboy COMOTIV SYSTEMS 111 SW Columbia Street Ste. 950 Portland, OR 97201 Telephone: 503.224.7496 Cell: 503.997.1367 Fax: 503.222.0185 [EMAIL PROTECTED] www.comotivsystems.com -----Original Message----- From: Isuru Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Thu 6/14/2007 12:05 AM To: Log4J Developers List Subject: Issue in fixing 'tailing' in Chainsaw Hi Scott and Pual, I tried to fix the bug with tailing on VFSLogFilePatternReceiver according to the method I explained in my previous mail. According to the provided interface of VFS, I think it is the best way of fixing this problem. So I implemented it and tested it under different scenarios. After my new fix, when the log file which is accessed through http (or some other protocol) receives log events frequently (without time gaps of more than 10 or 15 seconds), they are loaded on the fly in to Chainsaw and it works fine. But when new log events are not added to the log file for some time (more than about 15 seconds), 'rac.getInputStream()' (rac = RandomAccessContent Object) method call gives an exeption and execution gets stuck. Even if new log events are added to the log file later, it remains stuck. But for log files on the local file system, this method works fine. I sent the 2 patches containing changes to the VFSLogFilePatternReceiver class in Chainsaw and LogFilePatternReceiver in log4j. Please check it. I experimented many different ways of overcomming this issue, but it remains. I think this is a bug in Commons-VFS and I put a mail to their mailing list and hopefully they will suggest some solution for that. Sorry for taking too long for this fix due to this unexpected problem with VFS. While trying to fix this issue completely, I'll start working on my other tasks as well. Thanks, ~Isuru --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
