I have a mavenized project running on tomcat 8.5 .
I have a configuration according to a specific regulation for the logs. I am using log4j version 1.2.14 and I have my log4j.properties in my resource location (I have also tried to change that file location), that location is
src/main/filteredResources.
For other projects in which I have had to do the same, it has worked without problems, but of course, I used spring and I had to initialize the bean with the call to the file path. Without it, it did not show the log on the console nor did it create the logs file in the specified path. For this project struts is used and from what I have investigated, adding the properties in the root would be enough, but this has not been successful either.
The strange thing is that it shows me some logs on the console without having anything configured, but they are not in the format I want and I have them in log4j.properties .
After this, I used the parameter:
-Dlog4j.configuration=log4j.properties
This paints it on my locale, but I need it to keep working once deployed to other environments. Is there a real alternative to this?
Does anyone know how I could fix this?