System.Diagnostics

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to put a switch in my web.config that can configure and will let
me logsinformation to a textfile. Where can I find an example for that?
 
The Enterprise Library, which is a free download from Microsoft, has logging
capability, driven from a config file. The latest version also has a policy
injection block, which is useful for specifying when a particular message
should be logged (type of error, etc.) and is attribute driven. There is
plenty of documentation with the block, should you go this route.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
Last time I looked at the Enterprise Library, there was no way to log to an
email account, which I would prefer.
--
Arne Garvander
Certified Geek
Professional Data Dude


Cowboy (Gregory A. Beamer) said:
The Enterprise Library, which is a free download from Microsoft, has logging
capability, driven from a config file. The latest version also has a policy
injection block, which is useful for specifying when a particular message
should be logged (type of error, etc.) and is attribute driven. There is
plenty of documentation with the block, should you go this route.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
I am not sure if it is built in (will have to look), but you can more easily
extend the block today than you could before. Log4Net will log to email,
with the SMTPAppender:

http://logging.apache.org/log4net/

For config, see:
http://logging.apache.org/log4net/release/config-examples.html

roll down to SMTPAppender

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
Arne Garvander said:
Last time I looked at the Enterprise Library, there was no way to log to
an
email account, which I would prefer.
 
Back
Top