Hi

I also posted this question at 
http://stackoverflow.com/questions/1011730/log4net-context-only-for-exception
http://stackoverflow.com/questions/1011730/log4net-context-only-for-exception
. But I think this might be a better place. Here is the question:

I'm looking for a way to collect a set of data, that will only be used for
debugging, the data should only be logged if I log an exception. AFAIK it
can happend when ILog.Error, Fatal or Debug with an exception argument when
logging other data with an exception, the data shouldn't be logged.

I plan to use the GlobalContext or ThreadContext for building the dataset.

My idea was to hook into Log4Net and attach to an event I would imagine, to
alter the message pattern to include contexts. But I can't find any event
that would help me, perhaps there also might be a easier way?

What do you think about the overall design of this, am I on the right track
or am I missing something?

If this way is good, how can I implement it?


-- 
View this message in context: 
http://www.nabble.com/Log4net%3A-context-only-for-exception-tp24091804p24091804.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

Reply via email to