Enable Logging for mscorlib/system/runtime/serialization/formatters/binary/binaryobjectreader.cs

%3CLINGO-SUB%20id%3D%22lingo-sub-2118729%22%20slang%3D%22en-US%22%3EEnable%20Logging%20for%20mscorlib%2Fsystem%2Fruntime%2Fserialization%2Fformatters%2Fbinary%2Fbinaryobjectreader.cs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2118729%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20want%20to%20switch%20on%20logging%20of%20file%26nbsp%3Bmscorlib%2Fsystem%2Fruntime%2Fserialization%2Fformatters%2Fbinary%2Fbinaryobjectreader.cs%3C%2FP%3E%3CP%3ESo%20that%20I%20could%20understand%20the%20deserialization%20behavior.%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CSTRONG%3E%23%3C%2FSTRONG%3E%3CSTRONG%3Eif%3C%2FSTRONG%3E%20_DEBUG%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%3CSPAN%20class%3D%22e%22%3E%20%20%20%20%20%20%20%20%20%20%20%20SerTrace.Log(%20this%2C%20%22ParseMember%20%22%2CobjectPr.PRobjectId%2C%22%20%22%2Cpr.PRname)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20SerTrace.Log(%20this%2C%20%22ParseMember%20objectPr%20%22%2CobjectPr.Trace())%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20SerTrace.Log(%20this%2C%20%22ParseMember%20pr%20%22%2Cpr.Trace())%3B%3C%2FSPAN%3E%3CSTRONG%3E%23%3C%2FSTRONG%3E%3CSTRONG%3Eendif%3C%2FSTRONG%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BPlease%20let%20me%20know%2C%20how%20can%20I%20enable%20these%20traces%20when%20deserialization%20is%20performed.%20So%20that%20in%20the%20attached%20screenshot%2C%20I%20could%20figure%20out%20what%20is%20the%20reason%20for%20more%20function%20calls%20on%20the%20right%20side%20image%20of%20the%20attachment.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2119876%22%20slang%3D%22en-US%22%3ERe%3A%20Enable%20Logging%20for%20mscorlib%2Fsystem%2Fruntime%2Fserialization%2Fformatters%2Fbinary%2Fbinaryobjectreader.cs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2119876%22%20slang%3D%22en-US%22%3EYou're%20welcome!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2119776%22%20slang%3D%22en-US%22%3ERe%3A%20Enable%20Logging%20for%20mscorlib%2Fsystem%2Fruntime%2Fserialization%2Fformatters%2Fbinary%2Fbinaryobjectreader.cs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2119776%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20info%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F310193%22%20target%3D%22_blank%22%3E%40HotCakeX%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2118849%22%20slang%3D%22en-US%22%3ERe%3A%20Enable%20Logging%20for%20mscorlib%2Fsystem%2Fruntime%2Fserialization%2Fformatters%2Fbinary%2Fbinaryobjectreader.cs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2118849%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EI'd%20suggest%20trying%20Microsoft%20Doc's%20Q%26amp%3BA%20site%20which%20is%20for%20.NET%20topics%20you're%20talking%20about.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Ftopics%2Fdotnet-runtime.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Ftopics%2Fdotnet-runtime.html%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3Eyou%20can%20see%20all%20the%20available%20Q%26amp%3BA%20sites%20for%20.NET%20here%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Fproducts%2Fdotnet%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fanswers%2Fproducts%2Fdotnet%3C%2FA%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

I want to switch on logging of file mscorlib/system/runtime/serialization/formatters/binary/binaryobjectreader.cs

So that I could understand the deserialization behavior. 

#if _DEBUG                        
            SerTrace.Log( this, "ParseMember ",objectPr.PRobjectId," ",pr.PRname);
            SerTrace.Log( this, "ParseMember objectPr ",objectPr.Trace());
            SerTrace.Log( this, "ParseMember pr ",pr.Trace());#endif

 Please let me know, how can I enable these traces when deserialization is performed. So that in the attached screenshot, I could figure out what is the reason for more function calls on the right side image of the attachment.

3 Replies
Hi,
I'd suggest trying Microsoft Doc's Q&A site which is for .NET topics you're talking about.
https://docs.microsoft.com/en-us/answers/topics/dotnet-runtime.html

you can see all the available Q&A sites for .NET here:
https://docs.microsoft.com/en-us/answers/products/dotnet