commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Tran (JIRA)" <>
Subject [jira] [Commented] (IO-338) When a file is rotated, finish reading previous file prior to starting new one
Date Thu, 19 Jul 2012 00:07:34 GMT


Brian Tran commented on IO-338:

Hi everyone

I wrote the code and [~jcreasy] was patching on my behalf.

To respond to everyone's questions:

[~garydgregory] For the bug, are you referring to swapping out the call to IOUtils.closeQuietly
for its method definition or that the file is not read to completion after logrotation. I
didn't write unit tests for either, but am willing to do so. For the swapping out IOUtils.closeQuietly,
I was getting a runtime error that stopped once I swapped the method call for the definition.
For the file not reading to completion, I have a Java class that tails a file and prints to
stdout. Once I rotated the file, I would get nothing out of stdout after the rotation until
I made the changes seen in the patch.

[]When the file is rotated via the change the filename strategy, the save
variable is still pointing to the original file. The call file.length() refers to the new
file so that's how there's still unread data in the original file even though file.length()
could report 0.
> When a file is rotated, finish reading previous file prior to starting new one
> ------------------------------------------------------------------------------
>                 Key: IO-338
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>            Reporter: Jonathan Creasy
>         Attachments: IO-338-trunk.patch

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message