Results 1 to 3 of 3

Thread: What is MSBuild Logger

  1. #1
    Join Date
    Dec 2009
    Posts
    263

    What is MSBuild Logger

    What are MSBuild Logger :
    MSBuild has logging features that at first glance seem rather unspectacular, although, through the flexible configuration of a wide range of services cover but. With the aid of MSBuild loggers can be any output of a build process to an external component (console, file) forward. Technically, a logger is only one instance of a direct or indirect implementation of the interface ILogger from Microsoft.Build.Framework namespace.


    BuiltIn Logger :
    Microsoft has two BuiltIn MSBuild loggers placed in the luggage, which everyone can use in its build process:

    Console Logger
    - The Console Logger is responsible for the output from the command line
    - FileLogger
    - The FileLogger is to write the output into a file of responsible
    - The two existing logging solutions in many cases have the flexibility to select the information to the appropriate agencies to publish.


    Configuring loggers :
    Each process can build on exactly one console logger, but for up to ten FileLogger's offer. This allows you to log all common in MSBuild scenarios show even without this, you develop something, or third party would have to use software. Regardless of the type of logger configuration is beyond the logger parameter realized. Since the FileLogger of the class Console Logger is derived, has a superset of this logger settings.

  2. #2
    Join Date
    Dec 2009
    Posts
    263

    Re: What is MSBuild Logger

    Configuring the Console Logger :
    The Console Logger can be on the / console logger parameters (configured short / clp). Here you can set the following attributes

    PerformanceSummary
    If specified, the duration of individual actions issued

    Nosummary
    If specified, the total sum of the errors and warnings hidden

    NoItemAndPropertyList
    When specified, neither items nor Properties in Diagnostic mode issued

    Summary
    If specified, the total number of errors and warnings displayed

    ErrorsOnly
    It will only be issued if the error value is set

    WarningsOnly
    It will only be issued warnings if this value is set

    Show Command Line
    Expenditure of Events TaskCommandLineEvent be displayed on the console

    Show Time stamp
    In each issue, the current timestamp issued

    ShowEventId
    Is the EventID for the message events and the events "Started", "Completed" from

    ForceNoAlign
    Ignore the buffer size specified when the console

    DisableMPLogging
    Disables the logging of several concurrent build processes

    EnableMPLogging
    Enables the logging of several concurrent build processes


    Configuration of FileLogger :
    A FileLogger one hangs by the / FileLogger (short: / fl) to the build process and configure it via / fileloggerparameters (short: / flp). Should the configuration FileLogger not the first FileLogger act must be the parameters to an appropriate index (1-9) extend. The FileLogger 2-5 are thus about

    / Fl1 and / flp1
    / FL2 and / flp2
    / FL3 and / flp3
    / FL4 and / flp4
    initialized and configured.

    The indication of FileLoggerProperties here is implicitly, so as to avoid errors when the parameters of the sixth FileLogger's / flp5 indicating the actual logger but not by a tag / FL5 defined. In addition to the console logger parameters , the FileLogger four other parameters that can be specified

  3. #3
    Join Date
    Dec 2009
    Posts
    263

    Re: What is MSBuild Logger

    Write your own logger :
    To configure exactly as easy as logging, are so simple even own loggers are to write. Analogous to the development of their own tasks, you have also loggers in several possible ways, all leading to the goal.

    The ILogger implement interface :
    If you would like to develop from scratch a logger, you can the interface ILogger from the namespace Microsoft.Build.Framework use. The interface is available only a few Members, you must implement the list of all Members can be found in the MSDN Page of the interface.


    The event name should really be self-explanatory. The messages that their events are registered will be written to the Application log of Windows.



    Derived from the abstract class Logger :
    The MSBuild team has next to ILogger interface also an abstract base class logger comes with. Initialize method inherits one overwritten by the logger class has to be the only. If needed, the shutdown method can still be used to clean up.

    Expand an existing Logger :
    As with the task is even with the loggers the opportunity to expand the existing logger by inheriting directly or indirectly by them. Microsoft already provides such an example of inheritance with a logger who the Assembly Microsoft.Build.Framework.dll once a. NET Reflector has already opened, will have noticed that the class directly FileLogger ILogger interface is derived from the non, but a derivative of the Console Logger class is.
    When does it make sense?

    - Meaning the expansion of existing loggers make if I want to re-extend the existing functionality of a component or (specific examples: Verbosity implementation, Show Errors, Show Warnings and all logger parameters)

    Also speaking, of course, that with the existing logger already a common configuration API is rolled out. (Each of you can make a console logger configuration, even if only for this article). Moreover, the existing component already often used innumerable, so you can assume that at least the framework's logger is the more stable.


    Conclusion :
    Logging is important! Not only for travel in the universe or in the "normal" development, no even when writing build scripts, you should not forget the logging. Sooner or later the time will come when you are wishing for a log.

Similar Threads

  1. Best anti key logger software
    By T.Y.K in forum Networking & Security
    Replies: 5
    Last Post: 15-11-2012, 06:22 PM
  2. Webui logger always empty
    By Madhuparna in forum Technology & Internet
    Replies: 6
    Last Post: 23-06-2010, 11:59 PM
  3. How to launch MSBuild task from another?
    By Solitario in forum Windows Software
    Replies: 5
    Last Post: 09-01-2010, 06:53 PM
  4. What is a key logger?
    By marcman in forum Windows Software
    Replies: 3
    Last Post: 07-08-2009, 01:48 PM
  5. Trace Login Logger Usage
    By Andy Candy in forum Windows Software
    Replies: 3
    Last Post: 17-07-2009, 03:36 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,507,147.55180 seconds with 17 queries