Skip to content

xljiulang/FormattableLogging

Repository files navigation

FormattableLogging

参数插值日志组件

Nuget

<PackageReference Include="FormattableLogging" Version="1.0.0" />

功能

传统参数化日志写法:

var a = 1;
var b = 2;
this.logger.LogInformation("a = {a}; b = {b}", a, b);

FormattableLogging的写法:

var a = 1;
var b = 2;
this.logger.LogInformation($"a = {a}; b = {b}");

编译后和传统写法一样的参数效果

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published