Export (0) Print
Expand All

FileLogger Class

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

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

public class FileLogger : ConsoleLogger

The FileLogger type exposes the following members.

Public methodFileLoggerInitializes a new instance of the FileLogger class.

Public propertyParametersGets or sets the parameters passed to the ConsoleLogger. (Inherited from ConsoleLogger.)
Public propertyShowSummaryGets or sets a value indicating whether the logger will display a summary of errors and warnings. (Inherited from ConsoleLogger.)
Public propertySkipProjectStartedTextGets or sets a value indicating whether the logger will display messages when new projects are started during the build. (Inherited from ConsoleLogger.)
Public propertyVerbosityGets or sets the LoggerVerbosity level of the logger. (Inherited from ConsoleLogger.)
Protected propertyWriteHandlerGets or sets to the WriteHandler delegate for the ConsoleLogger. (Inherited from ConsoleLogger.)

Public methodApplyParameterAdds the specified parameter name and value to the logger. (Inherited from ConsoleLogger.)
Public methodBuildFinishedHandlerHandles the BuildFinished event. (Inherited from ConsoleLogger.)
Public methodBuildStartedHandlerHandles the BuildStarted event. (Inherited from ConsoleLogger.)
Public methodCustomEventHandlerHandles the CustomEventRaised event. (Inherited from ConsoleLogger.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodErrorHandlerHandles the ErrorRaised event. (Inherited from ConsoleLogger.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitialize(IEventSource)Registers the logger for the specified events. (Overrides ConsoleLogger.Initialize(IEventSource).)
Public methodInitialize(IEventSource, Int32)Registers the logger for the specified events. (Overrides ConsoleLogger.Initialize(IEventSource, Int32).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodMessageHandlerHandles the MessageRaised event. (Inherited from ConsoleLogger.)
Public methodProjectFinishedHandlerHandles the ProjectFinished event. (Inherited from ConsoleLogger.)
Public methodProjectStartedHandlerHandles the ProjectStarted event. (Inherited from ConsoleLogger.)
Public methodShutdownStops the logger, releases all resources, and closes the file to which the logger was writing. (Overrides ConsoleLogger.Shutdown().)
Public methodTargetFinishedHandlerHandles the TargetFinished event. (Inherited from ConsoleLogger.)
Public methodTargetStartedHandlerHandles the TargetStarted event. (Inherited from ConsoleLogger.)
Public methodTaskFinishedHandlerHandles the TaskFinished event. (Inherited from ConsoleLogger.)
Public methodTaskStartedHandlerHandles the TaskStarted event. (Inherited from ConsoleLogger.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWarningHandlerHandles the WarningRaised event. (Inherited from ConsoleLogger.)

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.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.
© 2015 Microsoft