語言

ConsoleLoggerExtensions 類別

定義

提供 和 ILoggingBuilder 類別的擴充方法ILoggerProviderConfiguration<T>。

public ref class ConsoleLoggerExtensions abstract sealed
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static class ConsoleLoggerExtensions
public static class ConsoleLoggerExtensions
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type ConsoleLoggerExtensions = class
type ConsoleLoggerExtensions = class
Public Module ConsoleLoggerExtensions
繼承
ConsoleLoggerExtensions
屬性

方法

名稱 Description
AddConsole(ILoggingBuilder, Action<ConsoleLoggerOptions>)

在工廠裡新增了一個名為「Console」的控制台記錄器。

AddConsole(ILoggingBuilder)

在工廠裡新增了一個名為「Console」的控制台記錄器。

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder, Action<TOptions>)

新增一個自訂的主控台日誌格式化器「TFormatter」,可設定為「TOptions」。

AddConsoleFormatter<TFormatter,TOptions>(ILoggingBuilder)

新增一個自訂的主控台日誌格式化器「TFormatter」,可設定為「TOptions」。

AddJsonConsole(ILoggingBuilder, Action<JsonConsoleFormatterOptions>)

在工廠新增並設定一個名為 'json' 的主控台日誌格式化器。

AddJsonConsole(ILoggingBuilder)

在工廠設定一個名為 'json' 的主控台日誌格式化器,並保留預設屬性。

AddSimpleConsole(ILoggingBuilder, Action<SimpleConsoleFormatterOptions>)

在工廠裡新增並設定一個名為「simple」的主控台日誌格式化器。

AddSimpleConsole(ILoggingBuilder)

將預設的控制台日誌格式化器「simple」加入帶有預設屬性的出廠設定。

AddSystemdConsole(ILoggingBuilder, Action<ConsoleFormatterOptions>)

在工廠新增並設定一個名為「systemd」的主控台日誌格式化器。

AddSystemdConsole(ILoggingBuilder)

在工廠裡加入一個名為「systemd」的主控台日誌格式化器,並帶有預設屬性。

適用於