George/Darren

public class SomeAction extends Action
{
ActionForward execute(..
{
//get a category
  static Category cat = 
Category.getInstance(StrutsServletClass.class.getName());
    // From here on, log away!  Methods are: cat.debug(your_message_string),
    // cat.info(...), cat.warn(...), cat.error(...), cat.fatal(...)

    cat.debug("You are inside execute method!!");
} //end init

then look at the uwaf-debug.log
HTH
Martin--
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Wednesday, June 14, 2006 5:12 PM
Subject: RE: [newb question] Turning on DEBUG level logging


I'm not sure about using 'DEBUG' as the name of an appender.  Why not
try something like 'logfile'?

I'm not very familiar with configuring Log4j using XML.  A simple
.properties file has always done everything I need.

> -----Original Message-----
> From: Darren Hall [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 14, 2006 2:24 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [newb question] Turning on DEBUG level logging
> 
> 
> I tried that. There is no output from log4j to the daily 
> catalina.log files.
> 
> However, taking another path, I created a new (and much 
> simpler) log4j.xml file. Using this new file, I now see the 
> following log file created 'C:\Program Files\Apache 
> Group\Tomcat 5.5\logs\uwaf-debug.log'. So... progress!
> 
> However, the log file contains nothing. None of my info or 
> debug statements were printed to the file. It's blank. What 
> did I do wrong now? Any ideas??
> 
> Thanks,
> 
> Darren
> 
> (log4j.xml)
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
> 
>   <appender name="DEBUG" class="org.apache.log4j.FileAppender">
>     <param name="File" value="logs/uwaf-debug.log" />
>     <param name="Threshold" value="DEBUG" />
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern" value="%d{ISO8601} %-5p 
> %c - %m%n"/>
>     </layout>
>   </appender>
> 
>   <logger name="com.uwaf">
>     <level value="debug"/>
>     <appender-ref ref="DEBUG"/>
>   </logger>
> 
> </log4j:configuration>
> 
> 
> 
> 
> -----Original Message-----
> From: Dave Newton [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 14, 2006 11:19 AM
> To: Struts Users Mailing List
> Subject: Re: [newb question] Turning on DEBUG level logging
> 
> Darren Hall wrote:
> > I'm not starting it from the command line any longer. Therefore, I 
> > can't
> see
> > any console output from Tomcat.
> >   
> 
> Try using a ConsoleAppender and tail -f the log file in the 
> tomcat log directory.
> 
> Dave
> 
> 
> 
> ---------------------------------------------------------------------
> 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]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to