Engine.RegisterDistributedLogger(ILogger, LoggerDescription) 方法

定义

向生成引擎注册分布式记录器。Registers distributed loggers with the build engine.

public:
 void RegisterDistributedLogger(Microsoft::Build::Framework::ILogger ^ centralLogger, Microsoft::Build::BuildEngine::LoggerDescription ^ forwardingLogger);
public void RegisterDistributedLogger (Microsoft.Build.Framework.ILogger centralLogger, Microsoft.Build.BuildEngine.LoggerDescription forwardingLogger);
member this.RegisterDistributedLogger : Microsoft.Build.Framework.ILogger * Microsoft.Build.BuildEngine.LoggerDescription -> unit
Public Sub RegisterDistributedLogger (centralLogger As ILogger, forwardingLogger As LoggerDescription)

参数

centralLogger
ILogger

一个表示中央记录器的 ILoggerAn ILogger that represents the central logger.

forwardingLogger
LoggerDescription

一个表示转发记录器的 LoggerDescriptionA LoggerDescription that represents the forwarding logger.

注解

此方法不是线程安全的。This method is not thread-safe. 为了确保行为一致,所有记录器都应在生成开始前注册。To ensure uniform behavior, all loggers should register before the build is started. 有关详细信息,请参阅编写可识别多处理器的记录器For more information, see Write multi-processor-aware loggers.

适用于