简体   繁体   中英

log4j.properties File not found

I know this question was already asked but I can't find/understand my error message. Here's the thing. I want to use log4j on an Apache Tomcat 8.5 with eclipse for a web application. So log4j works and I created a log4j.properties file. I placed it in my /src like it is recommended. Now comes the confusing thing for me. I get an Error Message:

log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (Das System kann die angegebene Datei nicht finden)

After this error, I get the log I am expecting, so is there maybe a place the compiler searches the file before it searches in the src folder or do I have to add any other dependency.

In addition, I'm not using Maven. THX

我认为你想把这个文件放在你的 src/main/resources 中,这样它就会自动出现在你的 maven 路径上。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM