Sunday, March 11, 2012

Access to variables in Custom Log Provider?

Hello,

I found one post from the past asking this question, but didn't see an answer, so I am hoping someone can shed some more light on it:

I am writing a custom log provider in C#. Is it possible give this custom log provider access to the variables collection (via a variabledispenser object)? First glance at the log provider classes would tell me that this is not possible, though I would like confirmation. Also, if I am correct in thinking it is not possible, what was the reason for leaving this out?

Thanks!

Indeed this does not appear to be possible. What is it you are trying to acheive? Some more info may help us evaluate this as a feature request for the future.

Donald

|||

Donald,

Thanks for the response. A brief explanation of my thought process below:

I have a package with a number of variables that are evaluated during package execution via property expressions. When a component of the package logs a warning or failure, I would like to be able to identify what state each variable was in at the time of that warning/failure. I had hoped to be able to create a custom log provider to log this information to a database along with the warning/failure message. If the VariableDispenser object was passed into the Log method of my custom log provider, I would be able to accomplish this.

Thanks again.

David

No comments:

Post a Comment