After upgrading to IDEA 2016.1: ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

Answered

My project has been working in IDEA 15, but after the upgrade to 2016.1 I get the following error when I run the project:

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

I do have a src/main/resources/log4j2.xml file, so I'm not sure why it's not being found.  Any ideas?

7 comments

Make sure the resources are copied to the classpath (target directory).

Attach the sample project to reproduce if the issue persists.

0

Hi,

I am also getting the same error while working on log4j2. could you please help me to resolve this issue.

Folder structure.

Error while loading log4j2 file even though the log4j2 file is placed inside resource folder 

Error:

ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2

These are the libraries I am using.

0

Hello,

Does it help if you mark "resource" directory as a "Resources Root"? Also you may try to put it under "src" folder:https://stackoverflow.com/a/25487455/2960034

0

Hi,

I have followed your instruction still same error is coming.  below I have attached sample example.

could you please check it.  I am not understanding this issue.

 

https://drive.google.com/open?id=14fyB-9T2N1I85OFwrOmXjBQX0DiMMP3G

0

Please follow these steps:

1. Unmark "TestLog" root as sources root

2. Mark "src" as sources root

3. Put "log4j2.xml" under "src" (without resources folder)

or

3. Put "resources" folder under "TestLog" root and mark it as "Resources Root"

0

Hi,

Thanks a lot. It is working fine.

Thank you for your support.

0

Please sign in to leave a comment.