question on logging block

  • Thread starter Thread starter siddharthkhare
  • Start date Start date
S

siddharthkhare

All,
1. Does exception block log the message asyncronously(i.e on a
different thread then the one that the call to log the message was
made on) ?
2. can i log custom fields (session ID , client IP address,department
name etc.) using exception block? can some one point me to some
documentation or samples on it?
3.Does exception block has concept of levels in it. so if i change the
level to be a value 'x' then only the messages logged with the level
of X or higer are actaually written to the store/DB. all other
message witten with a level lower level than 'X' are not written?

also it will good to know if lo4Net has these features?
THanks
Siddharth
 
All,
1. Does exception block log the message asyncronously(i.e on a
different thread then the one that the call to log the message was
made on) ?
2. can i log custom fields (session ID , client IP address,department
name etc.) using exception block? can some one point me to some
documentation or samples on it?
3.Does exception block has concept of levels in it. so if i change the
level to be a value 'x' then only the messages logged with the level
of X or higer are actaually written to the store/DB. all other
message witten with a level lower level than 'X' are not written?
What do you mean by "exception block"? Something like this:

try {
...
} catch (...) {
...
}

has no logging in it unless you add some. The .NET framework has built-in
logging for unhandled exceptions and framework crashes, but it's extremely
sparse (an event gets written to the event log, that's it).
also it will good to know if lo4Net has these features?

Yes, log4net has all the logging features you mentioned.
 
What do you mean by "exception block"? Something like this:

   try {
     ...
   } catch (...) {
     ...
   }

has no logging in it unless you add some. The .NET framework has built-in
logging for unhandled exceptions and framework crashes, but it's extremely
sparse (an event gets written to the event log, that's it).


Yes, log4net has all the logging features you mentioned.

My istake .. i meant logging block not exception block.
 
My istake .. i meant logging block not exception block.

But I have no idea what a "logging block" is either... unless you're
referring to some sort of "block" in the configuration file.

..NET has some logging features in the form of trace listeners, but these are
not really enterprise-grade. They certainly lack log4net's high
configurability (most has to be done programmatically), as well as some of
the more advanced features like rollover based on time or file size.
Database logging isn't supported out of the box either.
 
MS has set of application blocks such as Data access block , logging
block etc.

these are built in components that you can use in your
application ..here is link to logging block..

http://msdn.microsoft.com/en-us/library/cc309506.aspx

Thanks for the link, I'd never heard of it. Well, that's not quite true -- I
vaguely remember hearing about it once, but I never looked into it.

From the documentation it seems to be about on par with log4net with
regards to features, though I do find the log4net documentation to be a lot
more accessible.
 
Back
Top