While Matt's suggestion might be correct, I think the core issue is that
log4j.properties is not in the classpath of the running application. Since
the user mentioned struts-config.xml and web.xml, the app is clearly a webapp.
As such, log4j.properties (or log4j.xml) should go into WEB-INF/classes. Of
course, this assumes that log4j.jar is in WEB-INF/lib and child-first
classloading is being used (such as under Tomcat-standalone).
Jake
On Wed, 14 Nov 2007 09:49:13 -0600
"Matthew Kemp" <[EMAIL PROTECTED]> wrote:
Can you also post your log4j properties file? My guess is that the log
levels are not correct or that appenders are not attached appropriately.
Matt
On Nov 14, 2007 2:22 AM, msg2ajay <[EMAIL PROTECTED]> wrote:
hi friends,
I am new to log4j . i have written
[CODE]
- log4j.properties (file in /src/log4j.properties)
- my .java class is as below
import org.apache.commons.logging.*;
public class RegisterAction extends Action{
private static Log log = LogFactory.getLog("login.action.RegisterAction");
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse respoonse)
{
RegisterForm RForm = (RegisterForm)form;
log.debug("THIS IS A LOG EXAMPLE #############>>>>>>");
.
.
.
.
.
.
}
[/CODE]
- my doubt is do i need to configure in sturts-config.xml or web.xml about
the log4j.properties.
- I have am not getting the log.debug(''...."); statement in my
console....
can any bady show me some way.
Ajay
--
View this message in context:
http://www.nabble.com/where-can-i-see-the-log.Debug%28%22somemessage%22%29------message-tf4803416.html#a13742321
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]