I have configured logging to be done in a rolling log file and event log. However, what happens is if one fails, the second one don’t succeed either. Is there a way I can configure EntLib to try both before failing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The logic on processing the Trace Listeners is deep within the implementation of Enterprise Library so there is no built-in way to configure.
One alternative is to download the source code and make the changes that you want, rebuild and use that custom version of Enterprise Library.
Another approach would be to use Unity to inject custom code to add the additional logic to process multiple trace listeners if an error occurs. You’ll have to recreate much of the Enterprise Library logic but you wouldn’t have to directly modify Enterprise Library source. You can find the full details for the latter approach at http://randylevy.wordpress.com/2012/04/04/enterprise-library-logging-extensions-part-2/.