? ? @Test
? ? public void testLoggerLoaction() {
?
? ? ? ? String loggerBinderClassName = "org.slf4j.impl.StaticLoggerBinder";
? ? ? ? Class<?> loggerBinderClass = null;
? ? ? ? try {
? ? ? ? ? ? loggerBinderClass = Class.forName(loggerBinderClassName);
? ? ? ? } catch (ClassNotFoundException e) {
? ? ? ? ? ? System.out.println(loggerBinderClassName + " is not found");
? ? ? ? }
? ? ? ? URL loaction = loggerBinderClass.getProtectionDomain().getCodeSource().getLocation();
? ? ? ? System.out.println(loaction);
? ? }