You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by donald larmee <dl...@utopiansoft.com> on 2002/11/20 18:54:45 UTC

Re: Getting junk messages in log file (Followup=null) while using struts

Try putting the Logger(Category) in your pattern layout (via %c), so you 
can see who is doing the logging.  I am assuming that the message is coming 
from struts (or another component/jar that it relies on), which uses the 
jakarta logging/commons package(which in turn will use log4j if it 
available.) or log4j directly.



At 11:16 AM 11/20/2002 -0500, Venkat Reddy Valluri wrote:
>Hi,
>    I tried to log messages using log4j1.2.7.jar in my application using 
> struts,
>Here is code ..
>  public class TestAction extends ActionBase {
>   static Category cat = Category.getInstance(TestAction.class.getName());
>  private ActionForward doGetInfo(ActionMapping mapping,
>                                     ActionForm form,
>                                     HttpServletRequest request,
>                                     HttpServletResponse response
>                                    ) throws IOException, ServletException
>{
>   --------
>   --------------
>   -------------
>
>   PropertyConfigurator.configure("/tmp/log4j.properties");
>   cat.info("starting main");
>   -----------
>    --------
>  }
>}
>
>log4j.properties
>-------------------
>log4j.rootCategory=DEBUG, dest1
>log4j.appender.dest1=org.apache.log4j.FileAppender
>log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
>log4j.appender.dest1.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss,SSS} 
>[%p] [%t] - %m%n
>log4j.appender.dest1.File=/tmp/example.log
>log4j.logger.org.apache=WARN
>
>here is /tmp/example.log
>
>20/11/2002 11:03:06,438 [INFO] [HttpProcessor[8080][3]] - starting main
>20/11/2002 11:03:08,648 [DEBUG] [HttpProcessor[8080][3]] - Followup = null
>20/11/2002 11:03:12,222 [DEBUG] [HttpProcessor[8080][3]] - Followup = null
>20/11/2002 11:03:18,832 [DEBUG] [HttpProcessor[8080][3]] - Followup = null
>
>     Here I didn't understand why Iam getting this junk mesaage Followup=null
>
>
>Any help greatly appreciated
>
>Thks
>--Venkat
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
   donald h. larmee                               dlarmee@utopiansoft.com
                                                                          804.301.UTOP
                          utopian software concepts, inc.
                                  www.utopiansoft.com
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>