Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: Distinguishing logging events from multiple objects of the same type
Prev Next
You are not authorized to post a reply.

Author Messages
Harsha Perera

06/04/2008 1:59 PM  
Hello,
 
In my application I have multiple objects of say class Foo. Each has a unique identifier. They run under a single thread (i.e. All logging events have the same thread ID). How can I distinguish logging events from these objects and the other objects called by them? i.e. If the bar() method is called on Foo 1 which in turn calls t() on a Car object, I want to be able to easily identify that they all originated from the Foo 1. It can be done by pushing the ID of the Foo object onto the ThreadContext at the beginning of each method of the Foo class. Is there an easier way of doing this?
 
Thanks,
Harsha
 

Harsha Perera
Analyst Programmer
Symology Ltd
10 Kensworth Gate
200-204 High Street South
Dunstable
Bedfordshire
LU6 3HS
Tel: +44 (0) 1582 842626
http://www.symology.co.uk

Head Office: Vanguard House, Cotswold Park, Millfield Lane, Caddington, Bedfordshire, LU1 4AJ
Registered in England No. 1760502

NOTICE AND DISCLAIMER

This e-mail, and any files transmitted with it, is intended solely for the use of the addressee(s). It may contain confidential and legally privileged information. If you are not the intended recipient, any dissemination, copying or distribution of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and delete this e-mail, and any files transmitted with it, from your system. Any opinions expressed are those of the author, and do not necessarily represent those of Symology Ltd. Internet e-mail is not a fully secure communications medium. Please take this into account when sending e-mail to us. Any attachments to this e-mail are believed to be free from virus, but it is the responsibility of the recipient to make all the necessary virus checks.

 
You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > Distinguishing logging events from multiple objects of the same type



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement