A
Andrew Robinson
I am working on a large (for me) ASP.NET project that contains about 100 SQL
tables on the back end. We built a set of "entity" objects and service
provider objects to access our data with one entity and a corresponding
service provider for each table. Most of these are code generated and the
entire system is working very very well.
Now the customer has asked for some type of data base tracing functionality
to aid them in debugging when they make future updates to the project. This
tracing would write reads, writes and values to either a flat file or SQL
table when turned on.
The issue that I am having is finding a method for communicating to each of
the service provider objects that they need to enable tracing. Tracing needs
to be something that the average user turns on when having an issue and then
an admin or developer can view the trace files. On the web side I seen this
being set with some type of global value but I hate the idea of tying
tracing to a Session variable and then each of my 100s of data calls
checking this Session value. Just seems expensive. The fact that it needs to
be user enabled dynamically seems to exclude a value in a config file. I
don't want to refactor my code to tie all of these independent service
providers together with some type of common constructor value or class as
this would require a sizable modification to all existing pages.
Any ideas?
tables on the back end. We built a set of "entity" objects and service
provider objects to access our data with one entity and a corresponding
service provider for each table. Most of these are code generated and the
entire system is working very very well.
Now the customer has asked for some type of data base tracing functionality
to aid them in debugging when they make future updates to the project. This
tracing would write reads, writes and values to either a flat file or SQL
table when turned on.
The issue that I am having is finding a method for communicating to each of
the service provider objects that they need to enable tracing. Tracing needs
to be something that the average user turns on when having an issue and then
an admin or developer can view the trace files. On the web side I seen this
being set with some type of global value but I hate the idea of tying
tracing to a Session variable and then each of my 100s of data calls
checking this Session value. Just seems expensive. The fact that it needs to
be user enabled dynamically seems to exclude a value in a config file. I
don't want to refactor my code to tie all of these independent service
providers together with some type of common constructor value or class as
this would require a sizable modification to all existing pages.
Any ideas?