Commit 1bad913f by huangzhihong

Update README.md

parent e63e9367
...@@ -30,6 +30,34 @@ ...@@ -30,6 +30,34 @@
} }
``` ```
- **appsettings.json**
1. 移除所有 `Microsoft.Extension.logging` 的相关原生配置
1. 添加 `Serilog` 、`Exceptionless` 的配置
``` json
{
//"Logging": {
// "LogLevel": {
// "Default": "Debug",
// "System": "Information",
// "Microsoft": "Information"
// }
//}
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
}
},
"Exceptionless": {
"ApiKey": "hrOhVo64hIntQGW5D51PCm2wRlLw2z2VEhSKtZ6U",
"ServerUrl": "http://log.bailuntec.com/"
}
}
```
- [Skywalking 配置](#五使用-apm-扩展日志-skywalking) - [Skywalking 配置](#五使用-apm-扩展日志-skywalking)
1. **Console** 配置 1. **Console** 配置
...@@ -74,38 +102,35 @@ ...@@ -74,38 +102,35 @@
} }
``` ```
- **appsettings.json**
1. 移除所有 `Microsoft.Extension.logging` 的相关原生配置
1. **appsettings.json** 1. 添加 `Serilog` 、`Exceptionless` 的配置
1. 移除所有 `Microsoft.Extension.logging` 的相关原生配置 ``` json
{
1. 添加 `Serilog` 、`Exceptionless` 的配置 //"Logging": {
// "LogLevel": {
``` json // "Default": "Debug",
{ // "System": "Information",
//"Logging": { // "Microsoft": "Information"
// "LogLevel": { // }
// "Default": "Debug", //}
// "System": "Information", "Serilog": {
// "Microsoft": "Information" "MinimumLevel": {
// } "Default": "Information",
//} "Override": {
"Serilog": { "Microsoft": "Warning",
"MinimumLevel": { "System": "Warning"
"Default": "Information", }
"Override": { }
"Microsoft": "Warning", },
"System": "Warning" "Exceptionless": {
} "ApiKey": "hrOhVo64hIntQGW5D51PCm2wRlLw2z2VEhSKtZ6U",
"ServerUrl": "http://log.bailuntec.com/"
} }
}, }
"Exceptionless": { ```
"ApiKey": "hrOhVo64hIntQGW5D51PCm2wRlLw2z2VEhSKtZ6U",
"ServerUrl": "http://log.bailuntec.com/"
}
}
```
## 二、常用日志级别 ## 二、常用日志级别
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment