I can demonstrate this in my unit test, which is not running in an OSGi container.
I set up a "log4j.xml" file with level=WARN, made sure it's found in the classpath, and even turned on "log4j.debug" to show what log4j is finding. No change. Here's some output:
Quote:
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@1996cd68.
log4j: Using URL [file:..../target/test-classes/log4j.xml] for automatic log4j configuration.
log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
log4j: System property is :null
log4j: Standard DocumentBuilderFactory search succeded.
log4j: DocumentBuilderFactory is: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
log4j: debug attribute= "null".
log4j: Ignoring debug attribute.
log4j: reset attribute= "false".
log4j: Threshold ="null".
log4j: Retreiving an instance of org.apache.log4j.Logger.
log4j: Setting [org.hibernate.validator] additivity to [false].
log4j: Level value for org.hibernate.validator is [warn].
log4j: org.hibernate.validator level set to WARN
log4j: Class name: [org.apache.log4j.ConsoleAppender]
log4j: Setting property [target] to [System.out].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%-5p %c{1} - %m%n].
log4j: Adding appender named [ConsoleAppender] to category [org.hibernate.validator].
log4j: Level value for root is [warn].
log4j: root level set to WARN
[org.jboss.logging] : Logging Provider: org.jboss.logging.Log4j2LoggerProvider Ignored FQCN: org.jboss.logging.Logger
[org.hibernate.validator.internal.util.Version] : HV000001: Hibernate Validator 5.4.1.Final Ignored FQCN: org.hibernate.validator.internal.util.logging.Log_$logger
[org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver] : Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.engine.ConfigurationImpl] : Setting custom MessageInterpolator of type org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator Ignored FQCN: org.jboss.logging.DelegatingBasicLogger