4
我有一个在Smartfox服务器内运行的应用程序(扩展名)。你们大多数人都不会知道Smartfox,但是设置就像Tomcat。即扩展有它自己的类加载器,它首先从扩展中加载类,然后是全局服务器库(因为我不知道官方术语,如果存在的话,我会将其称为自私课加载)。如何使用沙箱SLF4J
我有一个多SLF4J绑定的问题,与我的包含扩展的logback和含有另一SLF4J绑定(也就是对我没用)服务器:
INFO | jvm 1 | 2011/10/06 11:10:25 | SLF4J: Class path contains multiple SLF4J bindings.
INFO | jvm 1 | 2011/10/06 11:10:25 | SLF4J: Found binding in [jar:file:/opt/smartfox/Server/lib/lsc.jar!/org/slf4j/impl/StaticLoggerBinder.class]
INFO | jvm 1 | 2011/10/06 11:10:25 | SLF4J: Found binding in [jar:file:/opt/smartfox/Server/wext/smilefish/logback-classic-jar-logback-classic-0.9.29.jar!/org/slf4j/impl/StaticLoggerBinder.class]
我希望自私的类加载会解决这种的问题,但显然它没有。我怎样才能解决这个问题而不删除任何绑定?
(参见Is there a Tomcat-like classloader that can be used standalone?为自私类加载器的源代码)