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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top