quarkus: Elasticsearch dependency causes no logging
Describe the bug Adding a dependency to Elasticsearch causes the following error:
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console…
Dependency: <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-elasticsearch-rest-high-level-client</artifactId> </dependency>
Expected behavior Logging should work out of the box, since I didn’t do much yet. Just tried to follow a basic getting started guide…
Actual behavior (Describe the actual behavior clearly and concisely.) I get the following error when starting the application: ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console…
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific). https://github.com/AlonaSharpe/code-with-quarkus
Or attach an archive containing the reproducer to the issue.
Steps to reproduce the behavior:
- Clone
- Compile
- Run
Configuration
# Add your application.properties here, if applicable.
quarkus.swagger-ui.always-include=true
Screenshots (If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
-
Output of
uname -aorver: Linux debian 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux -
Output of
java -version: openjdk version “11.0.7” 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode) -
GraalVM version (if different from Java):
-
Quarkus version or git rev: 1.9.1.Final 1.9.0.Final 1.5.0.Final
-
Build tool (ie. output of
mvnw --versionorgradlew --version): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /home/alona/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3 Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /usr/local/java/jdk-11.0.7+10 Default locale: en_IL, platform encoding: UTF-8 OS name: “linux”, version: “4.19.0-11-amd64”, arch: “amd64”, family: “unix”
Additional context I’ve also tried including various Elasticsearch client versions of org.elasticsearch.client:elasticsearch-rest-high-level-client and the result was the same.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (19 by maintainers)
Hmm, that’s odd. Are you using the Log4j APIs to log from your application? Did you follow the instructions here?