There are three ways to create a new custom logger:
Implement the ILogger interface
Extend the abstract Microsoft.Build.Utilities.Logger class
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 ...