https://github.com/blqw/blqw.Logging
基于 Standard 2.0 的日志组件
https://github.com/blqw/blqw.Logging
csharp dotnet logging standard
Last synced: about 1 year ago
JSON representation
基于 Standard 2.0 的日志组件
- Host: GitHub
- URL: https://github.com/blqw/blqw.Logging
- Owner: blqw
- License: gpl-3.0
- Created: 2018-08-13T05:53:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-05T11:52:56.000Z (almost 8 years ago)
- Last Synced: 2024-11-13T04:54:54.823Z (over 1 year ago)
- Topics: csharp, dotnet, logging, standard
- Language: C#
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blqw.Logging
日志框架([`Microsoft.Extensions.Logging`](https://www.baidu.com/s?ie=UTF-8&wd=Microsoft.Extensions.Logging))拓展功能
[blogs](https://www.jianshu.com/p/e01af9fa77e8)
## Demo
```
using blqw.Logging;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Diagnostics;
namespace Demo
{
class Program
{
static void Main(string[] args)
{
var log = new ServiceCollection()
.AddLogging(x => x.SetMinimumLevel(0))
.BuildServiceProvider()
.AddConsoleLogger()
.TraceListenerToLogger()
.GetLogger();
log.Debug("xxxxx");
Trace.WriteLine("yyyyy");
}
}
}
```
> 2018-08-27 15:38:41.940 【Debug】 xxxxx (Program.Main:18)
> 2018-08-27 15:38:42.139 【Trace】 yyyyy (System.Diagnostics.TraceListener)
## 更新说明
#### [1.0.1] 2018.09.01
* 调整代码
#### [1.0.0] 2018.08.27
* 更新说明