You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <as...@gmail.com> on 2007/08/27 17:40:16 UTC

logging with Log4J

Hi
Does anyone have an exmple of using log4j for logging struts messages,
I have an web application where i use log4j for logging, i have a
mapslog4j.xml file in WEB-INF folder and load this log file using
DOMConfigurator in a servlet.
This servlet is loaded before struts servlet,
but some how this is not
working, i do not get any logs from struts in my log file,


Ashish

Re: logging with Log4J

Posted by Laurie Harper <la...@holoweb.net>.
Ashish Kulkarni wrote:
> Hi
> Does anyone have an exmple of using log4j for logging struts messages,
> I have an web application where i use log4j for logging, i have a
> mapslog4j.xml file in WEB-INF folder and load this log file using
> DOMConfigurator in a servlet.
> This servlet is loaded before struts servlet,
> but some how this is not
> working, i do not get any logs from struts in my log file,

Firstly, why not name the config file log4j.xml and put it in 
WEB-INF/classes, so Log4J will load it automatically and you don't have 
to mess with DOConfigurator?

Secondly, what is the content of mapslog4j.xml? What did you set the 
root log level to? Did you configure specific log levels for Struts?

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org