https://github.com/followmetech/fm.logs
An extension Microsoft.Extensions.Logging
https://github.com/followmetech/fm.logs
Last synced: 9 months ago
JSON representation
An extension Microsoft.Extensions.Logging
- Host: GitHub
- URL: https://github.com/followmetech/fm.logs
- Owner: FollowmeTech
- License: mit
- Created: 2018-12-11T03:50:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-19T17:02:15.000Z (about 7 years ago)
- Last Synced: 2025-06-03T03:49:44.076Z (about 1 year ago)
- Language: C#
- Size: 15.6 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FM.Logs
An extension Microsoft.Extensions.Logging
[所有系统的对接总标准](https://github.com/FollowmeTech/FM.Logs/wiki/%E6%9C%8D%E5%8A%A1%E6%97%A5%E5%BF%97%E5%8F%8A%E8%B0%83%E7%94%A8%E6%97%A5%E5%BF%97%E8%A7%84%E8%8C%83)
### 统一的log4net.config
[统一的log4net.config](https://github.com/FollowmeTech/FM.Logs/blob/master/Samples/TestLog4NetProvider/log4net.config)
## 关键点是用log4net里面的loggername来区分,具体看sample代码
### 业务log使用方式
```csharp
var logger = loggerFactory.CreateLogger(typeof(Program));
logger.LogInformation("hello world");
```
### grpc accesss log使用方式
```csharp
var accesslog = loggerFactory.CreateLogger("grpc.access");
accesslog.LogDebug("grpc access log");
```