Compartir a través de


FileLogger Class

Extends the ConsoleLogger to log messages to a file rather than the console window.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Inheritance Hierarchy

System.Object
  Microsoft.Build.BuildEngine.ConsoleLogger
    Microsoft.Build.BuildEngine.FileLogger

Namespace:  Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

Syntax

'Declaration
Public Class FileLogger _
    Inherits ConsoleLogger
public class FileLogger : ConsoleLogger
public ref class FileLogger : public ConsoleLogger
type FileLogger =  
    class 
        inherit ConsoleLogger 
    end
public class FileLogger extends ConsoleLogger

The FileLogger type exposes the following members.

Constructors

  Name Description
Public method FileLogger Initializes a new instance of the FileLogger class.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Properties

  Name Description
Public property Parameters Gets or sets the parameters passed to the ConsoleLogger.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public property ShowSummary Gets or sets a value indicating whether the logger will display a summary of errors and warnings.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public property SkipProjectStartedText Gets or sets a value indicating whether the logger will display messages when new projects are started during the build.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public property Verbosity Gets or sets the LoggerVerbosity level of the logger.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Protected property WriteHandler Gets or sets to the WriteHandler delegate for the ConsoleLogger.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)

Top

Methods

  Name Description
Public method ApplyParameter Adds the specified parameter name and value to the logger.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method BuildFinishedHandler Handles the BuildFinished event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method BuildStartedHandler Handles the BuildStarted event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method CustomEventHandler Handles the CustomEventRaised event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method Equals (Inherited from Object.)
Public method ErrorHandler Handles the ErrorRaised event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method Initialize(IEventSource) Registers the logger for the specified events.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ConsoleLogger.Initialize(IEventSource).)
Public method Initialize(IEventSource, Int32) Registers the logger for the specified events.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ConsoleLogger.Initialize(IEventSource, Int32).)
Protected method MemberwiseClone (Inherited from Object.)
Public method MessageHandler Handles the MessageRaised event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method ProjectFinishedHandler Handles the ProjectFinished event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method ProjectStartedHandler Handles the ProjectStarted event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method Shutdown Stops the logger, releases all resources, and closes the file to which the logger was writing.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides ConsoleLogger.Shutdown().)
Public method TargetFinishedHandler Handles the TargetFinished event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method TargetStartedHandler Handles the TargetStarted event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method TaskFinishedHandler Handles the TaskFinished event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method TaskStartedHandler Handles the TaskStarted event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)
Public method ToString (Inherited from Object.)
Public method WarningHandler Handles the WarningRaised event.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Inherited from ConsoleLogger.)

Top

Remarks

The FileLogger writes messages to a file in exactly the same format as the ConsoleLogger writes messages to the console window.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.BuildEngine Namespace