Description
向控制台输出支持自定义对象格式的日志条目.
使用Microsoft.Extensions.Logging门面库.
Ac682.Extensions.Logging.Console alternatives and similar packages
Based on the "Logging" category.
Alternatively, view Ac682.Extensions.Logging.Console alternatives based on common mentions on social networks and blogs.
-
Semantic Logging Application Block (SLAB)
DISCONTINUED. Supporting semantic/structured logging for .NET -
ExcelDna.Diagnostics.Serilog
Integrate Excel-DNA Diagnostic Logging with your Serilog logging pipeling within your Excel-DNA add-in -
NLog.Targets.Pushover
DISCONTINUED. NLog.Targets.Pushover is a custom target for NLog enabling you to send logging messages to the Pushover service -
BugSnag
Logs errors. Includes useful diagnostic info like stack trace, session, release, etc. Has a free tier. [Free for OSS][$] -
Essential Diagnostics
Extends the inbuilt features of System.Diagnostics namespace to provide flexible logging
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Ac682.Extensions.Logging.Console or a related project?
README
Ac682.Extensions.Logging.Console
向控制台输出支持自定义对象格式的日志条目.
使用Microsoft.Extensions.Logging门面库.
安装
Install-Package Ac682.Extensions.Logging.Console
注入
// Startup.cs
public void ConfigureService(IServiceCollection services)
{
services.AddLogging(options => options
{
.AddConsole(c => c
.SetMinimalLevel(LogLevel.Information)
.AddBuiltinFormatters()
.AddFormater<CustomFormatter>())
});
}
配置
配置使用 ConsoleLoggerOptions
传入.
自定义 Formatter
本扩展使用 IObjectLoggingFormatter
序列化对象为可在控制台显示的上色文本.
自己实现该接口然后注册即可自动捕捉特定对象并发挥作用.
实现过程中缺啥构造啥,没有任何坑.