Yes, you need to configure Log4J; just dropping the JAR in isn't enough
for it to 'magically' know what you want it to do with log messages. See
the Log4J documentation for details on configuration. As a quick start,
you can create a WEB-INF/classes/log4j.properties with the following
content:
-----8<-----8<-----8<-----8<-----
# Set rootCategory to DEBUG/INFO/WARN/etc
# and specify which appender to output to
log4j.rootCategory=INFO, SYSOUT
# Override log level for specific packages...
log4j.logger.org.apache.struts=DEBUG
# Set up the appender (output target)
log4j.appender.SYSOUT=org.apache.log4j.ConsoleAppender
log4j.appender.SYSOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSOUT.layout.ConversionPattern=%-5p %d %c{5} - %m%n
-----8<-----8<-----8<-----8<-----
HTH,
L.
Leena Borle wrote:
Hi,
I did not add log4J.xml in the classpath. I am following "mailreader"
tutorial and did not see any in that application too. Do I have to add it
explicitly ?
Leena
On 7/13/07, Dave Newton <[EMAIL PROTECTED]> wrote:
Perhaps more importantly, do you have a log4j xml or
properties configuration file on the classpath? (IIRC
you do not need to explicitly initialize.)
--- Gary Feidt <[EMAIL PROTECTED]> wrote:
> What did you use for an Initialization procedure?
>
> >>> [EMAIL PROTECTED] 7/12/2007 3:21:42 PM >>>
> Hi,
> How to enable logging in S2? I added log4j.jar and
> isDebug statements
> in my
> actions, but do not see any messages.
> Leena
>
_______________________________________________________________
>
> Confidentiality Statement:
> This email/fax, including attachments, may include
> confidential
> and/or proprietary information and may be used only
> by the
> person or entity to which it is addressed. If the
> reader of
> this email/fax is not the intended recipient or his
> or her
> agent, the reader is hereby notified that any
> dissemination,
> distribution or copying of this email/fax is
> prohibited. If you
> have received this email/fax in error, please notify
> the sender
> by replying to this message and deleting this email
> or
> destroying this facsimile immediately.
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated
for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
---------------------------------------------------------------------
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]