Logging method values

  • Thread starter Thread starter ssg31415926
  • Start date Start date
S

ssg31415926

I want to log all of the values passed into each method to help
diagnosing problems that can't be reproduced in test (yet). Is there
an easy way to do this or do I have to write logging code specific to
each method?
 
Please try
StackFrame fr = new StackFrame(1,true);
StackTrace st = new StackTrace(fr);
EventLog.WriteEntry(fr.GetMethod().Name,
st.ToString(),
EventLogEntryType.Warning);

http://www.alvas.net - Audio tools for C# and VB.Net developers


"ssg31415926" <[email protected]> ???????/???????? ? ????????
?????????:
news:c1911277-1ead-478b-8220-5cb3b0a4b6d9@a28g2000hsc.googlegroups.com...
 
Back
Top