Extending the Logger Abstract Class
The definition for an MSBuild logger is that it implements the ILogger interface. You don’t need to implement this interface directly; you can extend the Logger abstract class instead. When you extend this class, you need to provide the definition only for the Initialize method. The class diagram for the Logger class is shown in Figure 5-5.
Figure 5-5. Logger class diagram
From Figure 5-5 you can see that there are three helper methods that can be used to help the logging process. Those methods are summarized in Table 5-5.
Table 5-5. Logger Helper Methods
Name | Description |
---|---|
FormatErrorEvent | This can be used to format a ... |
Get Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.