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

Extending Existing Loggers

In the previous section, we saw how we could create new loggers by implementing the ILogger interface and extending the Logger abstract class. The only other method to create a new logger is to extend an existing logger. We’ll now see how to accomplish this by extending the console logger. The console logger can be used as a basis for various loggers, not just those that log to the console. You may be surprised to find out that the FileLogger class extends the ConsoleLogger class! Some reasons you should consider extending this class are outlined here.

  • Ease of Creation. From the three methods listed previously for creating new loggers, extending an existing logger is the easiest method.

  • Automatic Indentation The console ...

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