My testing of log4j v2 just started getting my log output to my log files, but had <configuration status="trace" level="trace" >
I googled and found this no reflection log to stdout is from log4j2. :) This is an embedded env; IBM J9 J2ME jdk 1.6 on single core Arm chip, but I guess no reflection... I hope nothing internal is now going to malfunction? package org.apache.logging.log4j.core.selector; public class ClassLoaderContextSelector<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> implements ContextSelector<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ContextSelector.html> { private static void setupCallerCheck() { 223<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> try { 224<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> final ClassLoader loader = Loader.getClassLoader(); 225<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> final Class clazz = loader.loadClass("sun.reflect.Reflection"); 226<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> final Method[] methods = clazz.getMethods(); 227<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> for (final Method method : methods) { 228<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> final int modifier = method.getModifiers(); 229<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> if (method.getName().equals("getCallerClass") && Modifier.isStatic(modifier)) { 230<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> getCallerClass = method; 231<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> break; 232<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> } 233<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> } 234<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> } catch (final ClassNotFoundException cnfe) { 235<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> LOGGER.debug("sun.reflect.Reflection is not installed"); // <------------------------------ 236<http://logging.apache.org/log4j/2.x/log4j-core/xref/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html> } Curt Smith AT&T Digital Life DLC Software Development 404-499-7013 (cell) 678-365-6508
