During a long process in which many stored procedures are called with parameters, I want to store the names of these parameters and their values in a log table for debugging purposes.
My stored procedures have up to 7 parameters but some have none and some parameters have a default value.
I was thinking of a scalar function or a stored procedure to accomplish this. Is there a system table where this information is stored? Is there an easy way to do this?