Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xljiulang/formattablelogging
https://github.com/xljiulang/formattablelogging
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/xljiulang/formattablelogging
- Owner: xljiulang
- Created: 2022-03-02T03:47:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-02T04:02:18.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T03:19:21.805Z (3 months ago)
- Language: C#
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FormattableLogging
参数插值日志组件### Nuget
``````
### 功能
传统参数化日志写法:
``` c#
var a = 1;
var b = 2;
this.logger.LogInformation("a = {a}; b = {b}", a, b);
```
FormattableLogging的写法:
``` c#
var a = 1;
var b = 2;
this.logger.LogInformation($"a = {a}; b = {b}");
```
编译后和传统写法一样的参数效果