ConsoleLoggerExtensions.AddSystemdConsole 方法

定义

重载

AddSystemdConsole(ILoggingBuilder)

使用默认属性将名为“systemd”的控制台日志格式化程序添加到工厂。

AddSystemdConsole(ILoggingBuilder, Action<ConsoleFormatterOptions>)

将名为“systemd”的控制台日志格式化程序添加到配置了指定的控制台格式化程序选项的工厂。

AddSystemdConsole(ILoggingBuilder)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

使用默认属性将名为“systemd”的控制台日志格式化程序添加到工厂。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddSystemdConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddSystemdConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder);
static member AddSystemdConsole : Microsoft.Extensions.Logging.ILoggingBuilder -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddSystemdConsole (builder As ILoggingBuilder) As ILoggingBuilder

参数

builder
ILoggingBuilder

要使用的最新日志记录生成器实例。

返回

最新日志记录生成器实例,以便可以链接其他调用。

适用于

AddSystemdConsole(ILoggingBuilder, Action<ConsoleFormatterOptions>)

Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs
Source:
ConsoleLoggerExtensions.cs

将名为“systemd”的控制台日志格式化程序添加到配置了指定的控制台格式化程序选项的工厂。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Logging::ILoggingBuilder ^ AddSystemdConsole(Microsoft::Extensions::Logging::ILoggingBuilder ^ builder, Action<Microsoft::Extensions::Logging::Console::ConsoleFormatterOptions ^> ^ configure);
public static Microsoft.Extensions.Logging.ILoggingBuilder AddSystemdConsole (this Microsoft.Extensions.Logging.ILoggingBuilder builder, Action<Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions> configure);
static member AddSystemdConsole : Microsoft.Extensions.Logging.ILoggingBuilder * Action<Microsoft.Extensions.Logging.Console.ConsoleFormatterOptions> -> Microsoft.Extensions.Logging.ILoggingBuilder
<Extension()>
Public Function AddSystemdConsole (builder As ILoggingBuilder, configure As Action(Of ConsoleFormatterOptions)) As ILoggingBuilder

参数

builder
ILoggingBuilder

要使用的最新日志记录生成器实例。

configure
Action<ConsoleFormatterOptions>

用于为内置 systemd 日志格式化程序配置控制台记录器选项的委托。

返回

最新日志记录生成器实例,以便可以链接其他调用。

适用于