Yes, I agree but I've been asked to set the architecture so that finding 
the cause of a problem a client is having is immediate.  So, I think 
having the ability to set a level to where the parameters is logged.  I 
also agree now that using the built in trace functionality is a better 
approach.  The only question I have now is how to best write a utility 
function to handle the parameters so the coder doesn't have to write a 
trace line for each parameter in each funtion.  I want to centralize that 
code to a utility.




Message from Brian - IT Department 
<[EMAIL PROTECTED]>@DISCUSS.DEVELOP.COM received on 08/25/2005 
11:00 AM

08/25/2005 11:00 AM



Brian - IT Department <[EMAIL PROTECTED]>@DISCUSS.DEVELOP.COM

Please respond to "Unmoderated discussion of advanced .NET topics." 
<[email protected]>
Sent by "Unmoderated discussion of advanced .NET topics." 
<[email protected]>



        To:     [email protected]
        cc: 
        Subject:        Re: [ADVANCED-DOTNET] Writing code for Debugging

IMO Unit Tests are better for testing if functions are written
correctly.  Errors should be meaningful enough that you don't need
parameter values, but you *could* output that information with the most
verbose trace level - but this is the same advice you've been getting
from everybody else.  I'll leave these important architectual decisions
up to you...

Brian

Franklin Gray wrote:

>Ok....now...how about the part to write.  It's been a lot time but I
>vaguely remember coming across something that could access parameters of 
a
>function.  If I could build a function to call at the beginning of each
>function and it would check to see if the trace was turned on and if so 
it
>would loop through all the parameters of the calling function (the one I
>want to log the parameter values) then that would save a lot of typing 
and
>centralize the process.  Anybody know of such a thing?  It's been so long
>I don't even remember what to search for.
>
>The reason I want to log parameters is because though my years of work,
>I've found that to find a bug, the parameters to a function is the second
>best piece of information, first being the line of the error and the 
error
>description which of course is easy to retrieve.
>
>===================================
>This list is hosted by DevelopMentorĀ®  http://www.develop.com
>
>View archives and manage your subscription(s) at http://discuss.develop.com
>
>
>

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com



===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to