You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Abid Ali Teepo <ab...@mogul.no> on 2003/07/17 18:51:23 UTC

Logging of both servlets and JSP

Hi

I have problem logging for both servlets and JSP's within the same webapplication. I'm using tomcat 4.1.24

My servlet initialises log4j with a xml file located in the web-inf/classes directory. Everything works fine with logging in this servlet. In my servlet i initialised like this :

private static Logger logg = Logger.getLogger(BidServerProxy.class);

URL configFileResource = BidServerProxy.class.getResource("/log.xml");
DOMConfigurator.configure(configFileResource.getFile());

But i want logging for the jsp in the webapp as well.

For this purpose i downloaded the taglibrary for logging and installed it as directed. Now i get an error saying :

log4j:WARN No appenders could be found for logger (root).
log4j:WARN Please initialize the log4j system properly.

The logging for the servlet still works fine. I thought using the taglibrary it will initialise itself. And since i already had a xml file that initialised the logging for the servlet, the same will be used by the taglibs ??? 

Anyone have any suggestions ?

Regards
Abid

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