Another hate rant. So why is my log4j for my service inside axis not working. Anyone got an answer? I don’t I have been tracking this one for two days. Why is it working for other people but not for me? I am trying to read the configuration via the DOMConfigurator and it is not working. It just does not read the config, well it does not give error messages but it is not working either.
Here is the configuration.
<appender name=”general” class=”org.apache.log4j.RollingFileAppender”>
<param name=”File” value=”/some/path/my.log”/>
<param name=”MaxFileSize” value=”10MB”/>
<category name=”my.class.name” additivity=”false”>
And here is the corresponding code which is not working:
Logger logger1 = Logger.getLogger(my.class.name.class);
logger1.info(“all hail discordia now at once”);
This is not producing any logs and in addition there are no errors being logged in the tomcat files and I have not activated log4j logging for axis. Other people in the company are using the same setup with axis and services and very very similar (isomorph!!!) code and for them it is working and for me it is not. Log4j itself is working if I create the appender in the code and give it to the logger via the addAppender method.
Someone suggested there was a problem because tomcat is also using log4j but then he added: well for our application that is no problem.