tomcat log4j not working for me

T

Tomer

Hi,

I have a webapp in tomcat
I have log4j.properties in my webapps/mywebapp/WEB-INF/classes
In one of my classes i do:
private static Logger _log = Logger.getLogger(MyJSPBean.class);

and then in its methods i do some logging like:
_log.info("some info");
_log.info("some info");
_log.info("some info");

However i dont see anything in my log file nor in console.

Can anyone help me with this?
Following is my log4j.properties that i have under my WEB-INF/classes
handlers = org.apache.juli.FileHandler,
java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = mywebapp.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter

Thanks

Tomer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top