Click here to Skip to main content
15,913,408 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console.


What I have tried:

ADDEDlog4J2.XML
<dependencies>
	<dependency>
		<groupId>org.apache.logging.log4j</groupid>
		<artifactId>log4j-api</artifactId>
		<version>2.17.2</version>
	<dependency>
	<dependency>
		<groupid>org.apache.logging.log4j</groupid>
		<artifactId>log4j-core</artifactId>
		<version>2.17.2</version>
	<dependency>
<dependencies>
Posted
Updated 1-Mar-22 0:48am
Comments
Richard MacCutchan 1-Mar-22 4:28am    
have you tried what it suggests in the error message?
Member 11520335 1-Mar-22 5:00am    
I am able to compile the project. using core and api jar files
Richard MacCutchan 1-Mar-22 7:14am    
I repeat: have you tried what it suggests in the error message?
Member 11520335 1-Mar-22 5:00am    
I did not understand "SimpleLogger to log to the console."

1 solution

Quote:
I did not understand "SimpleLogger to log to the console."
Simple: it can't find the "real" logging API, so it;s using the most basic, simple output it can: the console.

That should work, unless there is no console attached to view the error ...
 
Share this answer
 
Comments
Member 11520335 1-Mar-22 7:07am    
But how to get rid of this error..It is saying " Please add log4j-core to the classpath" But i have already have that jar

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900