FileLogger 类

定义

扩展 ConsoleLogger 以便将消息记录到文件中,而不是记录到控制台窗口中。Extends the ConsoleLogger to log messages to a file rather than the console window.

public ref class FileLogger : Microsoft::Build::BuildEngine::ConsoleLogger
public class FileLogger : Microsoft.Build.BuildEngine.ConsoleLogger
type FileLogger = class
    inherit ConsoleLogger
Public Class FileLogger
Inherits ConsoleLogger
继承
FileLogger

注解

FileLogger消息写入到文件, 其格式ConsoleLogger与向控制台窗口写入消息的格式完全相同。The FileLogger writes messages to a file in exactly the same format as the ConsoleLogger writes messages to the console window.

构造函数

FileLogger()

初始化 FileLogger 类的新实例。Initializes a new instance of the FileLogger class.

属性

Parameters

获取或设置传递给 ConsoleLogger 的参数。Gets or sets the parameters passed to the ConsoleLogger.

(继承自 ConsoleLogger)
ShowSummary

获取或设置一个值,该值指示记录器是否显示错误和警告的摘要。Gets or sets a value indicating whether the logger will display a summary of errors and warnings.

(继承自 ConsoleLogger)
SkipProjectStartedText

获取或设置一个值,该值指示当在生成过程中有新项目启动时记录器是否显示消息。Gets or sets a value indicating whether the logger will display messages when new projects are started during the build.

(继承自 ConsoleLogger)
Verbosity

获取或设置记录器的 LoggerVerbosity 级别。Gets or sets the LoggerVerbosity level of the logger.

(继承自 ConsoleLogger)
WriteHandler

获取或设置 WriteHandlerConsoleLogger 委托。Gets or sets to the WriteHandler delegate for the ConsoleLogger.

(继承自 ConsoleLogger)

方法

ApplyParameter(String, String)

将指定的参数名和值添加到记录器。Adds the specified parameter name and value to the logger.

(继承自 ConsoleLogger)
BuildFinishedHandler(Object, BuildFinishedEventArgs)

处理 BuildFinished 事件。Handles the BuildFinished event.

(继承自 ConsoleLogger)
BuildStartedHandler(Object, BuildStartedEventArgs)

处理 BuildStarted 事件。Handles the BuildStarted event.

(继承自 ConsoleLogger)
CustomEventHandler(Object, CustomBuildEventArgs)

处理 CustomEventRaised 事件。Handles the CustomEventRaised event.

(继承自 ConsoleLogger)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
ErrorHandler(Object, BuildErrorEventArgs)

处理 ErrorRaised 事件。Handles the ErrorRaised event.

(继承自 ConsoleLogger)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
Initialize(IEventSource)

为记录器注册指定事件。Registers the logger for the specified events.

Initialize(IEventSource, Int32)

为记录器注册指定事件。Registers the logger for the specified events.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MessageHandler(Object, BuildMessageEventArgs)

处理 MessageRaised 事件。Handles the MessageRaised event.

(继承自 ConsoleLogger)
ProjectFinishedHandler(Object, ProjectFinishedEventArgs)

处理 ProjectFinished 事件。Handles the ProjectFinished event.

(继承自 ConsoleLogger)
ProjectStartedHandler(Object, ProjectStartedEventArgs)

处理 ProjectStarted 事件。Handles the ProjectStarted event.

(继承自 ConsoleLogger)
Shutdown()

停止记录器,释放所有资源,并关闭记录器向其中写入消息的文件。Stops the logger, releases all resources, and closes the file to which the logger was writing.

TargetFinishedHandler(Object, TargetFinishedEventArgs)

处理 TargetFinished 事件。Handles the TargetFinished event.

(继承自 ConsoleLogger)
TargetStartedHandler(Object, TargetStartedEventArgs)

处理 TargetStarted 事件。Handles the TargetStarted event.

(继承自 ConsoleLogger)
TaskFinishedHandler(Object, TaskFinishedEventArgs)

处理 TaskFinished 事件。Handles the TaskFinished event.

(继承自 ConsoleLogger)
TaskStartedHandler(Object, TaskStartedEventArgs)

处理 TaskStarted 事件。Handles the TaskStarted event.

(继承自 ConsoleLogger)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
WarningHandler(Object, BuildWarningEventArgs)

处理 WarningRaised 事件。Handles the WarningRaised event.

(继承自 ConsoleLogger)

适用于