Did you also put commons-logging.jar (**NOT** commons-logging-api.jar) in
WEB-INF/lib alonside log4j.jar?
If you've done this and you still don't get logging, try adding to
log4j.properties...
log4j.debug=true
Or, if log4j.properties isn't being picked up at all, you could try writing a
log4j.xml file, since the latter is picked up in preference to the former.
That is, if you had log4j.xml somewhere else on your classpath, it would be
used in preference to you log4j.properties in WEB-INF/classes. Putting
log4j.xml in WEB-INF/classes would guaranteee that it would be used rather
than some rogue one elsewhere on the classpath.
Or, you can add the following to the command line that starts Tomcat....
-Dlog4j.debug=true
Jake
On Wed, 14 Nov 2007 19:00:21 -0800 (PST)
msg2ajay <[EMAIL PROTECTED]> wrote:
Yes it is a webapp. I have placed in the the runtime classpath. When
compilation completes it is successfully comming to the
/classes/log4j.properties
- i suspect that may i need to configure in web.xml or do i need to write
log4j.xml file?
Jacob Kjome wrote:
You are running a webapp, right? "/src" is not a standard directory that
gets put
on the classpath. I'm asking you if it's in the runtime classpath, not in
your
compile-time source path.
Jake
msg2ajay wrote:
hi,
I have placed in the /src folder.
[CODE]
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L
-
%m%n
log4j.rootLogger=debug, stdout
[/CODE]
thanQ
Ajay
Matthew Kemp-2 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]
--
View this message in context:
http://www.nabble.com/where-can-i-see-the-log.Debug%28%22somemessage%22%29------message-tf4803416.html#a13760809
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]