[ 
https://issues.apache.org/jira/browse/VFS-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735808#action_12735808
 ] 

William Pietri commented on VFS-270:
------------------------------------

Hi, Ralph. Apparently you edited your message while I was responding, so let me 
respond to the new version here.

>From the perspective of the VFS library, that could well be an appropriate 
>INFO-level message.

However, anybody who uses my command-line tool isn't really interested in where 
some internal machinery would put temporary files if it happened to create them 
(which for my tool, I doubt it ever will, as I'm only reading off the local 
filesystem). From my end user's perspective, that is very much a DEBUG message.

For me as a consumer of the VFS library, I'd also call that a DEBUG message. I 
don't care particularly what it's doing; I just want it to work. If I have to 
dig into the internals of the library, then I'm debugging some issue, and so 
would turn on debug output.

As to the question of standard out, it's undeniable that when I use VFS in its 
default configuration to read and write a file on the local filesystem, stuff 
comes out of standard output. I'm not using any logging framework at all, and 
it appears that the logging framework that VFS chose defaults to printing to 
standard output. I grant that VFS may not write directly to standard output, 
but from my perspective, it comes to the same thing: a noisy app.

I understand that a lot of Java is done in a server-side context, where a) 
logging has been configured, and b) many people like very verbose logs. So the 
1.0 code is reasonable for that use case. I'm just using the library for 
something else. For the command line, the behavior could be better, which is 
why I called this an improvement, rather than a bug.

> Don't log VFS internal info unless vital
> ----------------------------------------
>
>                 Key: VFS-270
>                 URL: https://issues.apache.org/jira/browse/VFS-270
>             Project: Commons VFS
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Occurs for me under JDK 1.6 with 32 bit Linux, but 
> presume everywhere.
>            Reporter: William Pietri
>            Priority: Minor
>
> Please change VFS's default behavior so that it by default no longer produces 
> programmer-focused info to stdout.
> My situation is that I'm building a command-line tool. I'm using VFS because 
> a) the Java file API is somewhat awkward, and b) I wanted to have my tool run 
> in a dry-run mode, where it uses an in-RAM filesystem that gets discarded.
> Even when operating purely on local files, my command-line script produces 
> this output:
> Jul 27, 2009 1:00:02 PM org.apache.commons.vfs.VfsLog info
> INFO: Using "/tmp/vfs_cache" as temporary files store.
> Surely, that's interesting to VFS developers. And maybe that's interesting to 
> me as a developer using the library, although it makes me wonder why it's 
> creating temporary files while doing local file access. But that's definitely 
> not interesting to the users of my tool, especially ones who put it in a cron 
> job, getting regular mail that contains only this.
> My suggestion is twofold:
> 1) Change the default logging levels so that they're tuned to the interests 
> of a typical app consumer, rather than a developer. This message, for 
> example, should be at DEBUG level rather than INFO level. 
> 2) Optionally, allow developers who'd like more verbose logging of VFS 
> internals an easy way to say so. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to