[jira] Created: (VFS-270) Don't log VFS internal info unless vital

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org

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

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

Since people often end up on issue tracker pages after searching for error messages, I thought I'd offer my solution here. In my code, I now have this:

        Logger logger = Logger.getLogger(VfsLog.class.getName());
        logger.setFilter(new java.util.logging.Filter() {
            public boolean isLoggable(LogRecord record) {
                return !record.getMessage().equals("Using \"/tmp/vfs_cache\" as temporary files store");
            }
        });

And I do that before doing anything that uses the VFS stuff.

Note that this solution will only work if Apache Commons Logging ends up using the stuff built in to the JDK. If it has found and used another framework, you'll need an equivalent but different solution to suppress the excess output.

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ralph Goers commented on VFS-270:
---------------------------------

Wouldn't it be easier to just configure the logging level for commons vfs to be Error in the logging framework you are using?

> 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 | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ralph Goers edited comment on VFS-270 at 7/27/09 2:59 PM:
----------------------------------------------------------

Wouldn't it be easier to just configure the logging level for commons vfs to be Error or Warning in the logging framework you are using?

In thinking about it, this message seems totally appropriate to be an info level message. Why you would want to log at the info level by default seems questionable to me and I'm tempted to just mark this as wontfix.

      was (Author: [hidden email]):
    Wouldn't it be easier to just configure the logging level for commons vfs to be Error in the logging framework you are using?
 

> 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 | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ralph Goers edited comment on VFS-270 at 7/27/09 3:04 PM:
----------------------------------------------------------

Wouldn't it be easier to just configure the logging level for commons vfs to be Error or Warning in the logging framework you are using?

In thinking about it, this message seems totally appropriate to be an info level message. Why you would want to log at the info level by default seems questionable to me and I'm tempted to just mark this as wontfix.

Also, the problem description says that VFS is writing to stdout. That is incorrect. VFS uses commons configuration. Whatever logging framework is being used underneath that has been configured to write to stdout.

      was (Author: [hidden email]):
    Wouldn't it be easier to just configure the logging level for commons vfs to be Error or Warning in the logging framework you are using?

In thinking about it, this message seems totally appropriate to be an info level message. Why you would want to log at the info level by default seems questionable to me and I'm tempted to just mark this as wontfix.
 

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

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

Hi, Ralph. I'm not sure if you're talking about my proposed improvement or the temporary workaround I gave in the comment.

If the former, I'd say no; the easiest thing would be for VFS to default to being quiet unless there's a problem that an end user would actually care about. I'm currently not using a logging framework at all for my command-line app.

As to the latter, there could well be easier workarounds. I was just tired of getting a cron mail every hour, so I rummaged in the debugger to see what objects were involved in producing the output, and then poked at them until they stopped being noisy. If you have other workarounds, I'm sure people finding this page via Google would appreciate a cut-and-paste example.

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ralph Goers commented on VFS-270:
---------------------------------

You have not convinced me. While I'm not the only committer who could change this, and I certainly wouldn't veto a fix that does, I still think what VFS is doing is appropriate.

If you look at http://commons.apache.org/logging/guide.html#Quick%20Start you will see how Commons Logging determines what logging framework to use. If you have log4j in the classpath it will be used. If log4j isn't there and you are on a JDK 1.4 or greater JVM then the java.util.logging is being used. If not, then commons logging's SimpleLog.

For SimpleLog, just add

System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "warn");

to your application or add -Dorg.apache.commons.logging.simplelog.defaultlog=warn to the script that invokes your command line tool.

If java.util.logging is being used then the instructions are at http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/LogManager.html. You can copy the default logging.properties file and change its default from info to warn and then setting the "java.util.logging.config.file" property to point to that file. Another way to handle this is do

LogManager.getLogManager().getLogger("org.apache.commons.vfs").setLevel(Level.WARN);

Or you can just put the log4j jar in your classpath. I don't think it logs anything by default.

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

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

Ok. It's your library, so you should feel free to do whatever you want with it. I'm just trying to make and explain a request. I'm not really interested in convincing you to do or not do anything.

From what you say, I gather that one of two (or possibly two of two) statements are true.

One: the VFS project participants feel that it's correct behavior that just using VFS in its default configuration to read and write local files should result in printing to stdout.

Two: anybody using VFS should be obliged to first get and configure a logging framework.

From my perspective, the first is definitely not something I like. I come out of the Unix tradition, where tools generally are silent unless there's a major problem or output has been explicitly requested.

The second seems like an unnecessary burden to me; when I write library code, I try to minimize the number of hoops a library user has to jump through. For me as a VFS user, adding a logging framework just to hush VFS up is a step with a clear cost and no apparent benefit. And that's once I find out that getting and configuring a logging framework is a required action; that step definitely took me more time than the VFS library has so far saved me.

But as I said, it's your project, so as long as you understand why I'm requesting and why I think it's good, I'm content to be done with this interaction.

> 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 | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

William Pietri edited comment on VFS-270 at 7/27/09 4:21 PM:
-------------------------------------------------------------

Ok. It's your library, so you should feel free to do whatever you want with it. I'm just trying to make and explain a request. I'm not really interested in convincing you to do or not do anything.

From what you say, I gather that one of two (or possibly two of two) statements are true.

One: the VFS project participants feel that it's correct behavior that just using VFS in its default configuration to read and write local files should result in printing to stdout.

Two: anybody using VFS should be obliged to first get and configure a logging framework.

From my perspective, the first is definitely not something I like. I come out of the Unix tradition, where tools generally are silent unless there's a major problem or output has been explicitly requested.

The second seems like an unnecessary burden to me; when I write library code, I try to minimize the number of hoops a library user has to jump through. For me as a VFS user, adding a logging framework just to hush VFS up is a step with a clear cost and no apparent benefit. And that's once I find out that getting and configuring a logging framework is a required action; that step definitely took me more time than the VFS library has so far saved me.

But as I said, it's your project, so as long as you understand what I'm requesting and why I think it's good, I'm content to be done with this interaction.

      was (Author: wpietri):
    Ok. It's your library, so you should feel free to do whatever you want with it. I'm just trying to make and explain a request. I'm not really interested in convincing you to do or not do anything.

From what you say, I gather that one of two (or possibly two of two) statements are true.

One: the VFS project participants feel that it's correct behavior that just using VFS in its default configuration to read and write local files should result in printing to stdout.

Two: anybody using VFS should be obliged to first get and configure a logging framework.

From my perspective, the first is definitely not something I like. I come out of the Unix tradition, where tools generally are silent unless there's a major problem or output has been explicitly requested.

The second seems like an unnecessary burden to me; when I write library code, I try to minimize the number of hoops a library user has to jump through. For me as a VFS user, adding a logging framework just to hush VFS up is a step with a clear cost and no apparent benefit. And that's once I find out that getting and configuring a logging framework is a required action; that step definitely took me more time than the VFS library has so far saved me.

But as I said, it's your project, so as long as you understand why I'm requesting and why I think it's good, I'm content to be done with this interaction.
 

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-270) Don't log VFS internal info unless vital

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Ralph Goers commented on VFS-270:
---------------------------------

I think you misunderstand me.

You suggested that the Info messages be changed to be debug level messages. I disagree with that. However, I agree that the default level for SimpleLog being Info is wrong. That just seems to be too chatty. I'll see what I can do about that.

> 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.