웹 응용 프로그램에서 Entlib 5.0이 포함 된 사용자 지정 MongoDB Listener를 예외 처리기로 작성했습니다. 내가하고 싶은 무엇Enterprise Library 5.0 예외 처리기 : 오류 메시지에서 섹션을 제거하는 방법
----------------------------------------
Timestamp: 4/17/2012 4:13:50 PM
Message: HandlingInstanceID: c3c5f58a-89b3-4b64-b05d-3f72f998bab4
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
04/17/2012 16:13:50
Type : System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : MyCo.Webservices.TheCoolService
Data : System.Collections.ListDictionaryInternal
TargetSite : System.String TestExceptionHandling()
Stack Trace : at Logging.TestExceptionHandling() in C:\tfs\Development\Source\MyCo.Webservices.TheCoolService\Logging\Logging.cs:line 55
----------------------------------------
은 그래서 하나 개의 문서에이 정보의 대부분을 던져 : 그것은 빈 라인을 포함하여 아래 모든 "라인"에 대한 문서 항목을 생성한다는 사실을 제외하고 잘 작동합니다 동일한 오류에 대해 10 개의 서로 다른 문서가 존재하지 않습니다. 내 자신의 예외 포맷터 (http://msdn.microsoft.com/en-us/library/ff664587(v=pandp.50).aspx)를 작성하는 경우에도 customListener.Write() 메소드에 대한 여러 호출을 처리 할 수 없다. 각 메소드는 mongodb 콜렉션에 새 문서를 작성한다.
내 Entlib 환경이 제한되어 있지만 전체 ExceptionFormatter를 처음부터 작성하지 않으면이를 해결하는 방법이 없습니다. 누구든지이 문제를 해결할 수있는 아이디어가 있습니까?