O'Reilly logo

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build by William Bartholomew, Sayed Ibrahim Hashimi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Custom Loggers

There are three ways to create a new custom logger:

  1. Implement the ILogger interface

  2. Extend the abstract Microsoft.Build.Utilities.Logger class

  3. Extend an existing logger

In Figure 5-3, we showed the ILogger interface, which all loggers must implement. The abstract Logger class has been provided to serve as a base class for new loggers. This class implements all the requirements of the ILogger interface except overriding the Initialize method, which is left to subclasses. The third option is most likely the simplest; all you have to do is extend an existing logger and override a specific behavior. We will see how to utilize all three methods in this chapter.

We will first take a look at implementing the ILogger interface. We previously ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required