You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/05/16 04:07:48 UTC

DO NOT REPLY [Bug 9140] New: - SimpleLog uses getSystemResourceAsStream to load props

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9140>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9140

SimpleLog uses getSystemResourceAsStream to load props

           Summary: SimpleLog uses getSystemResourceAsStream to load props
           Product: Commons
           Version: 1.0 Final
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Logging
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: jrr@silverstream.com


The Log implementation, SimpleLog, uses getSystemResourceAsStream() to load the 
simplelog.properties file. Using getSystemResourceAsStream(), instead of something like 
this.getClass().getClassLoader().getResourceAsStream(), or even better, 
Thread.currentThread().getContextClassLoader().getResourceAsStream(), prevents the 
properties file from being deployed with an application. This forces the developer to put the 
properties file on the system classpath.

Why was the decision made to only look on at the 
system classloader? The LogFactory does a nice job of finding it's properties with 
findClassLoader(). A similar implementation for SimpleLog would be great.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>