I have a Spring MVC webapp and I have some external classes that are not on the class path. They are dynamically placed and are not known at startup time.
They are loaded like this:
List<Object> constructorArgs = new ArrayList<Object>();
List<Object> methodArgs = new ArrayList<Object>();
Constructor<?> c = (Constructor<?>)constructorArgs.get(0);
Method m = (Method)methodArgs.get(0);
Object o = c.newInstance();
Method myMethod = o.getClass().getMethod("myMethod", String.class);
However, none of the logging in those classes and methods work. I assume because they are not loaded at startup for some reason.
Is there a way to register this class with the logger? I am using slf4j with a log4j implementation.