So running vertx 3.4.1
Here is my build. gradle...
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.3'
}
repositories {
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
sourceCompatibility = '1.8'
dependencies {
compile 'io.vertx:vertx-core:3.4.1'
compile 'io.vertx:vertx-web:3.4.1'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.apache.logging.log4j:log4j-core:2.8.1'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1'
compile 'org.hibernate:hibernate-validator:5.4.1.Final'
compile 'org.glassfish:javax.el:3.0.1-b08'
compile ('cz.jirutka.validator:validator-collection:2.1.6') {
exclude module: 'hibernate-validator'
}
compile 'org.apache.solr:solr-solrj:6.4.2'
compile 'com.bazaarvoice.jolt:jolt-core:0.1.0'
compile 'com.bazaarvoice.jolt:json-utils:0.1.0'
}
mainClassName = 'io.vertx.core.Launcher'
shadowJar {
classifier = 'fat'
manifest {
attributes 'Main-Verticle': 'com.xxx.Main'
}
mergeServiceFiles {
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
Running...
java -Xmx4g -Xmx4g -jar search-api-fat.jar -Dvertx.logger-delegate-factory-class-name=io.vertx.core.logging.SLF4JLogDelegateFactory -Dlog4j.configurationFile=src/main/conf/loj4j2.xml
Any log from vertx logger doesn't consider the log4j2.xml file. Only 3rd parties like Netty, Hibernate etc... So If I change for instance the pattern layout all 3rd parties will use it except anything coming from vertx logger.
Is it something maybe with the fat jar that is generated?