[
https://issues.apache.org/jira/browse/IO-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17275770#comment-17275770
]
David Mollitor commented on IO-706:
-----------------------------------
Sorry,... one more "finally" comment:
A {{toString()}} method would be helpful. I typically use SLF4J and I could
see a statement like:
{code:java}
LOG.debug("Processed file {} in {}", filePath, timestampedObserver);
{code}
The beauty of it is that it only calls "toString()" if the logger framework is
configured for 'debug' level logging.
Otherwise folks would be tempted to do:
{code:java}
if (LOG.isDebugEnabled()) {
LOG.debug("Processed file {} in {}ms", filePath,
timestampedObserver.getOpenToCloseDuration());
}
{code}
> TimedOutputStream/TimedInputStream
> -----------------------------------
>
> Key: IO-706
> URL: https://issues.apache.org/jira/browse/IO-706
> Project: Commons IO
> Issue Type: New Feature
> Components: Streams/Writers
> Reporter: David Mollitor
> Priority: Major
>
> Create a {{FilterInputStream}} {{FilterOutputStream}} that records the time
> it was opened (instantiated) and the time it was closed. Add method to
> return the delta so that users can request the amount of time required to
> read from (or write to) the underlying Stream.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)