Delen via


FileLogger Class

A specialization of the ConsoleLogger that logs to a file instead of the console.

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.Logging.ConsoleLogger
    Microsoft.Build.Logging.FileLogger

Namespace:  Microsoft.Build.Logging
Assembly:  Microsoft.Build (in Microsoft.Build.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 Creates a file 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.

Top

Properties

  Name Description
Public property Parameters Gets or sets a semicolon-delimited list of parameter key-value pairs.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 switch that determines whether to suppress the display of errors and the warnings summary.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 switch that determines whether to suppress the display of project headers. 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 level of detail to show in the event log.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 Provides access to the write handler delegate so that it can be redirected if necessary (e.g. to a file).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 Applies a parameter 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 Called when the build is finished.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 Called when the build is started.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 Called to log a custom 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 Called to log an error 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) Signs up the console file logger for the given build 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) Initializes a file logger in a multiprocessor environment.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 Called to log a message 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 Called to log a project finished 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 Called to log a project started 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 Called when the build is finished.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 Called to log a target finished 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 Called to log a target started 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 Called to log a task finished 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 Called to log a task started 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 Called to log a warning 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 output in terms of what is written and how it looks is identical. For example you can log verbosely to a file using the FileLogger while simultaneously logging only high priority events to the console using a ConsoleLogger.

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.Logging Namespace