[slf4j-user] explicitly selecting an implementation
Ceki Gülcü
ceki at qos.ch
Tue Jun 24 14:23:17 CEST 2014
There is no way to explicitly tell slf4j to use a specific
implementation except of course placing the desired binding on the class
path.
On 6/23/2014 17:21, Jakub Suder wrote:
> Hi,
>
> I’m building an OSX application which includes a Java library that uses SLF4J. I’ve added my own simple logging implementation that redirects all logs to the native Cocoa code, by providing a StaticLoggerBinder (implements LoggerFactoryBinder) which creates a CocoaLoggerFactory which in turn creates a CocoaLogger.
>
> Everything is fine so far, except it turns out that some users have some unrelated Java software installed in their system that is added to Extensions directory, which causes it to be included by default in all Java apps. If they happen to have a different SLF4J implementation included there, it gets included before my own implementation, which causes an exception in the logging code and crashes my app.
>
> Is there any way to force SLF4J to use my own implementation explicitly, either through configuration or through code, and ignore the others that can be included at runtime? (I’ve tried to exclude the extension directories from the load path, but this in turn causes different problems because sometimes essential jars needed for various crypto functionality are included there, so I want to stop messing with that…)
>
> Kuba
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
More information about the slf4j-user
mailing list