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 Nitin Nair <ni...@pune.tcs.co.in> on 2003/05/03 09:04:25 UTC

doubts regarding NDC in log4j across servlets

Hi,
I am working in a project where for an EJB environment for logging the messages we are using Log4j. Here we are using nested diagnostics contexts (NDC) to differentiate logging requests from different clients. Now I have two servlets. Both are loaded on Startup, one after the another.As I have a requirement wherein I want  to differentiate the logging messages based on their session, I am initializing the logger in  the first servlet and doing the NDC.push() etc here only.
 The control flow in my application is as follows :-

    Servlet1 --> Servlet2 --> EJB [ 1... n]

Also as usual there are bean to bean calls.

Currently what is happening is, on using NDC/MDC, all the logger stmts in
Servlet1 are getting printed properly with correct user name. But the moment
control comes in Servelt2 onwards, the user info is getting missed out.
Is there someting in particular which needs to be taken care of ??? Or How
do we achieve this?
The log messages look something like this.The portion where the host information is being lost is shown in bold letters....

 DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside init() of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside doPost(HttpServletRequest req, HttpServletResponse res) method of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside doGet(HttpServletRequest req, HttpServletResponse res) of class comnServlet
NITIN.pune.tcs.co.in  INFO [ExecuteThread: '12' for queue: 'default'] - Request type is null
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside initComnAgent(URL logonURL,Vector LogOnData) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getInstance() of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from getInstance() of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside attachrequiresClientContext (ClientContext iclntCtxt) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from attachrequiresClientContext (ClientContext iclntCtxt) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getInstance() of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from getInstance() of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside attachsecuredBySecurityAgentClient (SecurityAgentClient isecAgent) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from attachsecuredBySecurityAgentClient (SecurityAgentClient isecAgent) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside LogOn( Vector input) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from LogOn( Vector input) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from initComnAgent(URL logonURL,Vector LogOnData) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside openWindow (Vector dataClassesFromParent,String mode,gu_window cWindow, String ParentName) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from openWindow (Vector dataClassesFromParent,String mode,gu_window cWindow, String ParentName) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from doGet(HttpServletRequest req, HttpServletResponse res) of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside doPost(HttpServletRequest req, HttpServletResponse res) method of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside doGet(HttpServletRequest req, HttpServletResponse res) of class comnServlet
NITIN.pune.tcs.co.in  INFO [ExecuteThread: '12' for queue: 'default'] - Request type is null
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside copyToScreenVals(HttpServletRequest req,WinBase instWin) of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from copyToScreenVals(HttpServletRequest req,WinBase instWin) of class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside MakeRequest(String svcName,Vector input, Vector output) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside CreateResponse(WebArchRequest req) of class ServiceCallResponseFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from CreateResponse(WebArchRequest req) of class ServiceCallResponseFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside the constructor ThreadSpecificContext(String) of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - While creating ThreadSpecificContext, type is UTCS
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from the constructor ThreadSpecificContext(String) of class ThreadSpecificContext
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside setBeanContext(EJBContext contextInst, EnterpriseBean beanInst) of class ThreadSpecificContext 
  INFO [ExecuteThread: '11' for queue: 'default'] - In setBeanContext, type is UTCS
  INFO [ExecuteThread: '11' for queue: 'default'] - dataSource is  weblogic.jdbc.common.internal.RmiDataSource@3d6442
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from setBeanContext(EJBContext contextInst, EnterpriseBean beanInst) of class ThreadSpecificContext 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside SetdataSource(javax.sql.DataSource in)  of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - DataSource is weblogic.jdbc.common.internal.RmiDataSource@3d6442
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside SetBTAuditFlag( String BT_Name ) of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - SQL Statement is select AuditFlg from BT_TBL_AUD where BT_Name = ?
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside Create(int errFlagIn) of class Logger
  INFO [ExecuteThread: '11' for queue: 'default'] - SQL Statement is  insert into Tbl_licagentdetails (   LICAgentNo  ,LICAgentName  ,LICAgentAddress  ,Tbl_licagentdetails_ver  ,DM_LstUpdDt  ) VALUES (  ?,?,?,? , ? ) 
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from Create(int errFlagIn) of class Logger
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside updateState(WebArchComponent s) of class Tracer 
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] - Returning from doGet(HttpServletRequest req, HttpServletResponse res) of class comnServlet


The property file is like this:
log4j.rootLogger=info, R
log4j.appender.R=org.apache.log4j.FileAppender
log4j.appender.R.File=C:\\Deployment\\Logthis.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%x %5p [%t] - %m%n

In order to get the host information in the first servlet as well, what should I do..

Would  really appreciate a quick response 

Regards
Nitin Nair
MasterCraft, 
Tata Consultancy Services,
54B,Hadapsar Industrial Estate
Hadapsar,Pune
Maharashtra-411013
Ph-(020)-4042546
E-mail:nitindn@pune.tcs.co.in

Re: doubts regarding NDC in log4j across servlets

Posted by Steve Ebersole <st...@austin.rr.com>.
It actually easy enough to see the problem in the log statements themselves.

You must remeber that both NDC and MDC use the concept of thread locals to
propogate their information across calls.  Notice in all your log statements
with the NDC inormation that the thread is named "[ExecuteThread: '12' for
queue: 'default']"; the ones where it does not show up is named
"[ExecuteThread: '11' for queue: 'default']".

Your app server is starting a new execution thread at sometime between the
messages:
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
CreateResponse(WebArchRequest req) of class ServiceCallResponseFactory

The NDC/MDC information is local to a given thread and thus is not visible
in the new thread.



----- Original Message -----
From: "Nitin Nair" <ni...@pune.tcs.co.in>
To: <lo...@jakarta.apache.org>
Sent: Saturday, May 03, 2003 2:04 AM
Subject: doubts regarding NDC in log4j across servlets


Hi,
I am working in a project where for an EJB environment for logging the
messages we are using Log4j. Here we are using nested diagnostics contexts
(NDC) to differentiate logging requests from different clients. Now I have
two servlets. Both are loaded on Startup, one after the another.As I have a
requirement wherein I want  to differentiate the logging messages based on
their session, I am initializing the logger in  the first servlet and doing
the NDC.push() etc here only.
 The control flow in my application is as follows :-

    Servlet1 --> Servlet2 --> EJB [ 1... n]

Also as usual there are bean to bean calls.

Currently what is happening is, on using NDC/MDC, all the logger stmts in
Servlet1 are getting printed properly with correct user name. But the moment
control comes in Servelt2 onwards, the user info is getting missed out.
Is there someting in particular which needs to be taken care of ??? Or How
do we achieve this?
The log messages look something like this.The portion where the host
information is being lost is shown in bold letters....

 DEBUG [ExecuteThread: '12' for queue: 'default'] - Inside init() of class
comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside doPost(HttpServletRequest req, HttpServletResponse res) method of
class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside doGet(HttpServletRequest req, HttpServletResponse res) of class
comnServlet
NITIN.pune.tcs.co.in  INFO [ExecuteThread: '12' for queue: 'default'] -
Request type is null
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside initComnAgent(URL logonURL,Vector LogOnData) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getInstance() of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from getInstance() of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside attachrequiresClientContext (ClientContext iclntCtxt) of class
ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from attachrequiresClientContext (ClientContext iclntCtxt) of
class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getInstance() of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from getInstance() of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside attachsecuredBySecurityAgentClient (SecurityAgentClient isecAgent) of
class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from attachsecuredBySecurityAgentClient (SecurityAgentClient
isecAgent) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside LogOn( Vector input) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from LogOn( Vector input) of class ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from initComnAgent(URL logonURL,Vector LogOnData) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside openWindow (Vector dataClassesFromParent,String mode,gu_window
cWindow, String ParentName) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from openWindow (Vector dataClassesFromParent,String
mode,gu_window cWindow, String ParentName) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from doGet(HttpServletRequest req, HttpServletResponse res) of
class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside doPost(HttpServletRequest req, HttpServletResponse res) method of
class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside doGet(HttpServletRequest req, HttpServletResponse res) of class
comnServlet
NITIN.pune.tcs.co.in  INFO [ExecuteThread: '12' for queue: 'default'] -
Request type is null
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside copyToScreenVals(HttpServletRequest req,WinBase instWin) of class
comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from copyToScreenVals(HttpServletRequest req,WinBase instWin) of
class comnServlet
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside MakeRequest(String svcName,Vector input, Vector output) of class
ComnAgent
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
CreateResponse(WebArchRequest req) of class ServiceCallResponseFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from
CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from
CreateResponse(WebArchRequest req) of class ServiceCallResponseFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from
CreateRequest(ServiceCallRequest sreq) of class ServiceCallRequestFactory
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside the constructor
ThreadSpecificContext(String) of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - While creating
ThreadSpecificContext, type is UTCS
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from the
constructor ThreadSpecificContext(String) of class ThreadSpecificContext
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
setBeanContext(EJBContext contextInst, EnterpriseBean beanInst) of class
ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - In setBeanContext, type
is UTCS
  INFO [ExecuteThread: '11' for queue: 'default'] - dataSource is
weblogic.jdbc.common.internal.RmiDataSource@3d6442
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from
setBeanContext(EJBContext contextInst, EnterpriseBean beanInst) of class
ThreadSpecificContext
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside
SetdataSource(javax.sql.DataSource in)  of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - DataSource is
weblogic.jdbc.common.internal.RmiDataSource@3d6442
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside SetBTAuditFlag(
String BT_Name ) of class ThreadSpecificContext
  INFO [ExecuteThread: '11' for queue: 'default'] - SQL Statement is select
AuditFlg from BT_TBL_AUD where BT_Name = ?
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Inside Create(int
errFlagIn) of class Logger
  INFO [ExecuteThread: '11' for queue: 'default'] - SQL Statement is  insert
into Tbl_licagentdetails (   LICAgentNo  ,LICAgentName  ,LICAgentAddress
,Tbl_licagentdetails_ver  ,DM_LstUpdDt  ) VALUES (  ?,?,?,? , ? )
 DEBUG [ExecuteThread: '11' for queue: 'default'] - Returning from
Create(int errFlagIn) of class Logger
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside updateState(WebArchComponent s) of class Tracer
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Inside getLabelFromResourceBundle(String lb) in class WinBase
NITIN.pune.tcs.co.in DEBUG [ExecuteThread: '12' for queue: 'default'] -
Returning from doGet(HttpServletRequest req, HttpServletResponse res) of
class comnServlet


The property file is like this:
log4j.rootLogger=info, R
log4j.appender.R=org.apache.log4j.FileAppender
log4j.appender.R.File=C:\\Deployment\\Logthis.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%x %5p [%t] - %m%n

In order to get the host information in the first servlet as well, what
should I do..

Would  really appreciate a quick response

Regards
Nitin Nair
MasterCraft,
Tata Consultancy Services,
54B,Hadapsar Industrial Estate
Hadapsar,Pune
Maharashtra-411013
Ph-(020)-4042546
E-mail:nitindn@pune.tcs.co.in



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org