logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Budamala, Jayakumar [CCC-OT_IT]" <jayakumar.budam...@citigroup.com>
Subject RE: Calling Configure serveral time
Date Wed, 14 Feb 2007 20:17:21 GMT
Hi Ron,

I need your help regarding the log4net wrapper I am using.

Basically I implemented TxLog impl and TxLog manager using sample from eventID extension.

That is 	

public class TxLogImpl : LogImpl,ITxLog
And ITxLog inherits Ilog.

The problem I am facing is not getting caller location. 

I prepare loggingevent constructor, with caller FQCN, like this

	private void LogTx( log4net.Core.Level level, String callerFQCN, String transactionID, StartTx
startTime, object[] pParams)
		{
			if (transactionID == null)
			{
				return ;
			}
			if (callerFQCN != null)
			{
				FQCN = callerFQCN;
			}

			Type FQCNType = SystemInfo.GetTypeFromString(FQCN,false,false);
			System.String txMessage = generateMessage(transactionID, startTime, pParams, level);
			LoggingEvent loggingEvent = new LoggingEvent(FQCNType, Logger.Repository, Logger.Name,
level, txMessage, null);

			loggingEvent.Properties["TransactionID"] = transactionID;
			Logger.Log(loggingEvent);
		}

And this entire TxLogImpl and TxLogManager is wrapped by my own interface called ITxLogger
where I am passing my own object
, where I have declared like this

		private static readonly ITxLog logTx = TxLogManager.GetLogger(Assembly.GetCallingAssembly(),"EITLogger.Category.TxLogImpl");


					//object [] objArray = txObj.toObjectArray();
					object [] objArray = txObj.toObjectArrayValues();
					
					switch(level.ToString())
					{
						case "INFO":
						{
							logTx.Info(transactionId,FQCN,startTime,objArray);
							//log.Info(

							break;
					}

logTx.Info interanlly calls TxLogImpl Ilog method as shown above.

Now the problem is I am not able to line number , methodname, callers information etc.
Loggingevent LocationInfo, constructor, frameindex is equal to Framecount, that’s why its
not getting any callers info, when I debug.

Could you kindly give me some suggestion please.
 


Thanks and regards, 
Jayakumar Budamala 
Citigroup Architecture &  Technology Engineering (CATE)  - EIT
Citigroup Campus 
283, King George Rd 
Warren, NJ - 07059 
Tel : 908-563-3064


-----Original Message-----
From: wang junwei [mailto:kelekingone@hotmail.com] 
Sent: Sunday, February 11, 2007 9:20 AM
To: log4net-user@logging.apache.org
Subject: Re: Calling Configure serveral time

Hi, Sergey. Sorry for the two days not available in the list.
It seems that you have got what you want.
Actually, If you check or uncheck you add-in from the Add-in Manager, It will cause th corresponding
class instantialized or desstructed.It will call the log4net XmlConfigurator every time incuring
perfermance issue.But it does work.

Regards
>From: Sergey <iwds@udm.ru>
>Reply-To: "Log4NET User" <log4net-user@logging.apache.org>
>To: log4net-user@logging.apache.org
>Subject: Re: Calling Configure serveral time
>Date: Thu, 8 Feb 2007 18:22:45 +0000 (UTC)
>
>Thank you all! That is what I was looking for.
>
>Sergey
>

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  


Mime
View raw message