Vote count:
0
I am building a WAR/EAR project using Maven. The project consists of a main EAR project that bundles an WAR project.
The WAR project itself contains a jar file as a dependency (custom needed library).
All the modules of the project use slf4j/log4j for logging. The jar library has its own log4j.properties file which is located at /src/main/resources
The thing is that I get a complaint from log4j that the jar library doesn't have an appender. The main WAR project, can find the .properties file and outputs everything as it's supposed to.
I am not using the rootLogger in the .properties files.
In WAR project I am getting the appender as :
- private static final LOGGER = LoggerFactory.getLogger("main."+MyHttpHandlerClass.class);
- private static final Logger AUDIT_LOGGER = LoggerFactory.getLogger("audit."+MyHttpHandlerClass.class);
In JAR project:
- private static final LOGGER = LoggerFactory.getLogger("actions."+MyActionsClass.class);
Any suggestions?
asked 1 min ago
log4j - slf4j - maven - war - ear - jar as library to main war project
Aucun commentaire:
Enregistrer un commentaire