Unfortunately that won't work. If slf4j is present in the classpath, and they want to use it for other frameworks, and our Binding is loaded first, it would override all other frameworks.
For example, if they included jsecurity.jar (with our internal slf4j binding implementation) + some-other-framework.jar + slf4j-api.jar + slf4j-log4j14.jar + log4j.jar, and our Binding was picked up first by the classloader, then log4j would be disabled for the application - not desirable. My solution on the other hand will work in this scenario. On Tue, Jul 15, 2008 at 10:45 AM, Alan D. Cabrera <[EMAIL PROTECTED]> wrote: > Sure it is, if we lock them into java util logging. If people want to use > slf4j, then they can use jsecurity-core with an slf4j-whatever jar. > > > Regards, > Alan > > On Jul 15, 2008, at 7:41 AM, Les Hazlewood wrote: > >> As discussed on the "SLF4J StaticLoggerBinder" thread, it appears not >> to be possible. >> >> On Tue, Jul 15, 2008 at 10:38 AM, Alan D. Cabrera <[EMAIL PROTECTED]> >> wrote: >>> >>> The idea was that you make an SLF4J implementation. >>> >>> On Jul 15, 2008, at 7:24 AM, Les Hazlewood wrote: >>> >>>> JSecurityLogFactory does the graceful degredation that I desire. >>>> >>>> On Tue, Jul 15, 2008 at 10:21 AM, Alan D. Cabrera <[EMAIL PROTECTED]> >>>> wrote: >>>>> >>>>> I'm confused. Why do we still have JSecurityLogFactory if we're going >>>>> to >>>>> use the SLF4J API? >>>>> >>>>> >>>>> Regards, >>>>> Alan >>>>> >>>>> >>>>> On Jul 15, 2008, at 7:02 AM, Les Hazlewood wrote: >>>>> >>>>>> That is, the following: >>>>>> >>>>>> //SL4J native API >>>>>> Logger log = LoggerFactory.getLogger(getClass()); >>>>>> >>>>>> is functionally identical to this: >>>>>> >>>>>> //JSecurity wrapper API: >>>>>> Log log = JSecurityLogFactory.getLog(getClass()); >>>>>> >>>>>> _if_ SLF4J is anywhere the classpath. If not, there is graceful >>>>>> degredation. This solution does not use reflection. >>>>>> >>>>>> On Tue, Jul 15, 2008 at 10:00 AM, Les Hazlewood <[EMAIL PROTECTED]> >>>>>> wrote: >>>>>>> >>>>>>> Ok, I committed a solution that will definitely work with NO class >>>>>>> loader issues. >>>>>>> >>>>>>> It uses static linking just like SLF4J. Now there should be no more >>>>>>> arguments against this solution due to potential CL issues - they >>>>>>> can't occur now. >>>>>>> >>>>>>> Please do an SVN update and look at JSecurityLogFactory again. I've >>>>>>> tested this and works well. >>>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > >
