commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: [VFS] "anonymous" debug logging
Date Thu, 26 Mar 2009 03:54:21 GMT
I'm not a big fan of that. I prefer using Logback's and Log4j's  
ability to include the class name, method name and line number in the  
logging pattern. The overhead of that is not that large now that they  
are both using the getStackTrace method to get the information. In  
fact, I'd prefer to switch to SLF4J and just replace

		if (log.isDebugEnabled())
		{
			log.debug("putFile: " + file.getName());
		}

with

		logger.entry(file.getName());

using SLF4J's XLogger class.  But although that is what I would prefer  
I wouldn't dream about doing that without lots of discussion first.

Ralph

On Mar 25, 2009, at 4:00 PM, Gary Gregory wrote:

> Hi VFS:
>
> When we turn debug on for every thing I our app I noticed that we  
> are getting a lot of log entries like:
>
> 2009-03-25 12:17:06,342 [main] DEBUG: putFile: file:///C:/...
>
> I see that this is done from VFS in:
>
> http://commons.apache.org/vfs/xref/org/apache/commons/vfs/cache/SoftRefFilesCache.html#147
>
> This is all fine except that it is unhelpful to have log entries be  
> what I'd call 'anonymous'. What about prefixing all VFS log entries  
> with 'VFS '?
>
> I'm sure that this could be discussed at the [all] commons level,  
> but I'd like to start here.
>
> Thoughts?
>
> I am happy to patch VFS or commit directly.
> Gary Gregory
> Sr. Software Engineer
> Seagull Software, a Rocket Software Company
> 3340 Peachtree Road, Suite 820 * Atlanta, GA 30326 * USA
> Tel: +1.404.364.1752 * Fax: +1.404.760.0061
> Email: ggregory@rocketsoftware.com<mailto:ggregory@rocketsoftware.com>
> Web: www.seagullsoftware.com<http://www.seagullsoftware.com/>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message