共用方式為


LoggingSession.AddLoggingChannel 方法

定義

多載

AddLoggingChannel(ILoggingChannel)

將記錄通道新增至目前的記錄會話。

AddLoggingChannel(ILoggingChannel, LoggingLevel)

將具有指定記錄層級的記錄通道新增至目前的記錄會話。

AddLoggingChannel(ILoggingChannel)

將記錄通道新增至目前的記錄會話。

public:
 virtual void AddLoggingChannel(ILoggingChannel ^ loggingChannel) = AddLoggingChannel;
/// [Windows.Foundation.Metadata.Overload("AddLoggingChannel")]
void AddLoggingChannel(ILoggingChannel const& loggingChannel);
[Windows.Foundation.Metadata.Overload("AddLoggingChannel")]
public void AddLoggingChannel(ILoggingChannel loggingChannel);
function addLoggingChannel(loggingChannel)
Public Sub AddLoggingChannel (loggingChannel As ILoggingChannel)

參數

loggingChannel
ILoggingChannel

要加入的記錄通道。

實作

屬性

另請參閱

適用於

AddLoggingChannel(ILoggingChannel, LoggingLevel)

將具有指定記錄層級的記錄通道新增至目前的記錄會話。

public:
 virtual void AddLoggingChannel(ILoggingChannel ^ loggingChannel, LoggingLevel maxLevel) = AddLoggingChannel;
/// [Windows.Foundation.Metadata.Overload("AddLoggingChannelWithLevel")]
void AddLoggingChannel(ILoggingChannel const& loggingChannel, LoggingLevel const& maxLevel);
[Windows.Foundation.Metadata.Overload("AddLoggingChannelWithLevel")]
public void AddLoggingChannel(ILoggingChannel loggingChannel, LoggingLevel maxLevel);
function addLoggingChannel(loggingChannel, maxLevel)
Public Sub AddLoggingChannel (loggingChannel As ILoggingChannel, maxLevel As LoggingLevel)

參數

loggingChannel
ILoggingChannel

要加入的記錄通道。

maxLevel
LoggingLevel

loggingChannel的記錄層級。

實作

屬性

備註

您也可以使用此函式來變更通道新增至會話的層級;若要這樣做,請使用現有的記錄通道呼叫 AddLoggingChannel,但使用更新的層級。

另請參閱

適用於