You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by rohit s <ro...@yahoo.co.in> on 2004/04/02 13:05:50 UTC

Log4Net in COM+

 I am using log4net for logging messages thru my application. The main components involved doing so are, 

1. MyLogServer: This component is implemented by us which uses .Net EnterpriseServices and deployed as COM+ Server Application. This component calls log4net assembly to log the messages. This exposes every method which is there in log4net e.g. LogInfo, PushNDC, PopNDC etc. You can say this is the only interface for all my clients to use log4net in turn. 

2. MyLogClient: This is the client component for testing. This calls MyLogServer to log a message. 

So, if we go thru the call stack then, its like, 
MyLogClient ------> MyLogServer -----> log4net 

I am facing a problem in this scenario. Consider the following sequence of calls given by MyLogClient, 
MyLogServer.NDCPush(userID) 
MyLogServer.LogInfo(msg1) 
MyLogServer.LogInfo(msg2) 
MyLogServer.LogInfo(msg3) 
MyLogServer.NDCPop() 

The log file output is not the expected one. For some of the messages it sets the userID set by NDCPush method and for some it does not do. I really donn understand why is this happening. 

I found one thing that as and when I deploy MyLogServer component as COM+ Library application rather than server application, everything starts working fine. Please consider that I have to deploy it as server application because I want to use some COM+ services. 

Please help me if anyone have any clue as to why is this showing such kind of behaviour. 


Win an evening with the Indian cricket captain: Yahoo! India Promos.