Tim Holloway wrote:Log4j properties are expected to be located in the application classpath. For web applications, that would be /WEB-INF/classes/log4j.properties or /WEB-INF/classes/log4j.xml
Any other log4 configuration would have to be done in application logic.
but I don't have those folders do I need to create that classes folder inside my WEB inf??
Also I forgot to mention that it's a
maven web aplication this is my project structure
MyWebAppProjectName
--Web Pages
--WEB-INF
--jsp
index.jsp
--resources
--js
js.js
--css
site.css
log4j.properties
--Source Packages
--config
ConfigMVC.java
WebInitializaer.java
--controllers
HomeController.java
--Test Packages
--Other Resources
--src/main/resources
--default package
--log4j.properties
--Dependencies
--Java Dependencies
--Project FIles
So I put the log4j.properties in the Other Resources/src/main/resources and when I did this Netbeans created a default Package with the file inside like this default package/log4j-properties and it worked the logs starting to appear in the output and everything worked fine as expected.
I tried to create a package named Log4jResource inside this path src/main/resources but when I did this it stopped to work and the error showed again, so it's there a way to put this file in that folder but without having to use default package that NetBeans creates when I put the folder in there.
I tried doing refactor rename the default package but it shows me this error Module JPA Refactoring threw java.lang.NullPointerException. Please report a bug against JPA Refactoring module and attach your var/log/messages.log.
It would be better if I create that classes folder inside my WEB-INF??