FileLogger Class


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

Namespace:   Microsoft.Build.Logging
Assembly:  Microsoft.Build (in Microsoft.Build.dll)


public class FileLogger : ConsoleLogger


Creates a file logger.


Gets or sets a semicolon-delimited list of parameter key-value pairs.(Inherited from ConsoleLogger.)


Gets or sets a switch that determines whether to suppress the display of errors and the warnings summary.(Inherited from ConsoleLogger.)


Gets or sets a switch that determines whether to suppress the display of project headers. (Inherited from ConsoleLogger.)


Gets or sets the level of detail to show in the event log.(Inherited from ConsoleLogger.)


Provides access to the write handler delegate so that it can be redirected if necessary (e.g. to a file).(Inherited from ConsoleLogger.)

System_CAPS_pubmethodApplyParameter(String, String)

Applies a parameter to the logger. (Inherited from ConsoleLogger.)

System_CAPS_pubmethodBuildFinishedHandler(Object, BuildFinishedEventArgs)

Called when the build is finished.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodBuildStartedHandler(Object, BuildStartedEventArgs)

Called when the build is started.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodCustomEventHandler(Object, CustomBuildEventArgs)

Called to log a custom event.(Inherited from ConsoleLogger.)


Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodErrorHandler(Object, BuildErrorEventArgs)

Called to log an error event.(Inherited from ConsoleLogger.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Signs up the console file logger for the given build events. (Overrides ConsoleLogger.Initialize(IEventSource).)

System_CAPS_pubmethodInitialize(IEventSource, Int32)

Initializes a file logger in a multiprocessor environment.(Overrides ConsoleLogger.Initialize(IEventSource, Int32).)


Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodMessageHandler(Object, BuildMessageEventArgs)

Called to log a message event.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodProjectFinishedHandler(Object, ProjectFinishedEventArgs)

Called to log a project finished event.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodProjectStartedHandler(Object, ProjectStartedEventArgs)

Called to log a project started event.(Inherited from ConsoleLogger.)


Called when the build is finished.(Overrides ConsoleLogger.Shutdown().)

System_CAPS_pubmethodTargetFinishedHandler(Object, TargetFinishedEventArgs)

Called to log a target finished event.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodTargetStartedHandler(Object, TargetStartedEventArgs)

Called to log a target started event.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodTaskFinishedHandler(Object, TaskFinishedEventArgs)

Called to log a task finished event.(Inherited from ConsoleLogger.)

System_CAPS_pubmethodTaskStartedHandler(Object, TaskStartedEventArgs)

Called to log a task started event.(Inherited from ConsoleLogger.)


Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodWarningHandler(Object, BuildWarningEventArgs)

Called to log a warning event.(Inherited from ConsoleLogger.)

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.

.NET Framework
Available since 4.0

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

Return to top