Logging Exception in logFiles

Topics: Exception Handling Application Block, Logging Application Block
Jun 15, 2010 at 1:27 PM

I want to log exception in a File file using enterprise library 4.1...The file would be located on server.

Can any one please some code snippet :)

Jun 16, 2010 at 1:00 AM

Can you specify the full path on the server in the config file?  If yes, and your application has the necessary permission to write to that location, then specifying the full path on a Flat File Trace Listener's FileName property should work.   The API used for logging, regardless of where you will be logging to is any of the different overloads of the Write method of the Logger class.  You can refer to this section in the documentation.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.