Logging in Custom Build action for Tfs Build 2010
In a previous post I dealt with the creation of a Custom Activity to use in TFS2010 builds, in that example I did not dealt about logging. Logging is a vital task to do in custom action, because it is quite difficult to attach a debugger to the Build Agent, and if a build fails, it is really important to be able to understand what is gone wrong.
If you want to log from a custom action you can use this simple function
|
|
Thanks to this function I can use with my custom activity, here is how I use it in my XmlPoke activity, used to change content of an xml file.
|
|
Thanks to this message I can find information on the build log.
This is really useful because I can, in this example, verify witch file was changed by my action simply looking at the build log.
alk.