Commit 03525d7b by huangzhihong

Update README.md

parent 75532b0f
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
## 一、集成方法 ## 一、集成方法
1. **AspNetCore** 配置 1. **AspNetCore** 配置
- `Startup.cs` - `Startup.cs`
``` C# ``` C#
...@@ -14,7 +13,6 @@ ...@@ -14,7 +13,6 @@
app.UseAbpService(_appConfiguration, loggerFactory, apiInfo); app.UseAbpService(_appConfiguration, loggerFactory, apiInfo);
} }
``` ```
- `Program.cs` - `Program.cs`
``` C# ``` C#
...@@ -34,9 +32,9 @@ ...@@ -34,9 +32,9 @@
``` ```
1. **Console** 配置 1. **Console** 配置
- `Program.cs` - `Program.cs`
1. **appsettings.json** 1. **appsettings.json**
1. 移除所有 `Microsoft.Extension.logging.ILogger` 的配置 1. 移除所有 `Microsoft.Extension.logging.ILogger` 的配置
...@@ -133,7 +131,6 @@ ...@@ -133,7 +131,6 @@
``` ```
1. 输出格式化 1. 输出格式化
- 值对象,直接输出值。 包括以下: - 值对象,直接输出值。 包括以下:
- Booleans - bool - Booleans - bool
...@@ -149,7 +146,6 @@ ...@@ -149,7 +146,6 @@
var count = 456; var count = 456;
Log.Information("Retrieved {Count} records", count); Log.Information("Retrieved {Count} records", count);
``` ```
- 集合,继承自 `IEnumerable` - 集合,继承自 `IEnumerable`
> 如下示例,打印结果为: `In my bowl I have ["Apple","Pear","Orange"]` > 如下示例,打印结果为: `In my bowl I have ["Apple","Pear","Orange"]`
...@@ -158,7 +154,6 @@ ...@@ -158,7 +154,6 @@
var fruit = new[] { "Apple", "Pear", "Orange" }; var fruit = new[] { "Apple", "Pear", "Orange" };
Log.Information("In my bowl I have {Fruit}", fruit); Log.Information("In my bowl I have {Fruit}", fruit);
``` ```
- Dictionary,继承自 `IEnumerable`, Key 类型为值类型 - Dictionary,继承自 `IEnumerable`, Key 类型为值类型
> 如下示例,打印结果为: `In my bowl I have {"Apple":1,"Pear":5}` > 如下示例,打印结果为: `In my bowl I have {"Apple":1,"Pear":5}`
...@@ -167,7 +162,6 @@ ...@@ -167,7 +162,6 @@
var fruit = new Dictionary<string, int> { { "Apple", 1 }, { "Pear", 5 } }; var fruit = new Dictionary<string, int> { { "Apple", 1 }, { "Pear", 5 } };
Log.Information("In my bowl I have {Fruit}", fruit); Log.Information("In my bowl I have {Fruit}", fruit);
``` ```
- Dictionary,继承自 `IEnumerable`, Key 类型为复杂类型 - Dictionary,继承自 `IEnumerable`, Key 类型为复杂类型
> 如下示例,打印结果为: `In my bowl I have ["[Bailun.ServiceFabric.Trace.Test.Fruit, 1]","[Bailun.ServiceFabric.Trace.Test.Fruit, 5]"]` > 如下示例,打印结果为: `In my bowl I have ["[Bailun.ServiceFabric.Trace.Test.Fruit, 1]","[Bailun.ServiceFabric.Trace.Test.Fruit, 5]"]`
...@@ -194,7 +188,6 @@ ...@@ -194,7 +188,6 @@
1. 扩展属性 1. 扩展属性
> 扩展的属性全都展示在 Exceptionless 日志详情的 Extended Data,Exceptionless 会给属性加上索引,方便检索。以下两种方式添加自定义扩展属性 > 扩展的属性全都展示在 Exceptionless 日志详情的 Extended Data,Exceptionless 会给属性加上索引,方便检索。以下两种方式添加自定义扩展属性
- `AddProperty` 扩展方法: - `AddProperty` 扩展方法:
``` C# ``` C#
...@@ -202,7 +195,6 @@ ...@@ -202,7 +195,6 @@
.AddProperty("CustomProperty1", "CustomValue1") //自定义扩展属性 CustomProperty1 .AddProperty("CustomProperty1", "CustomValue1") //自定义扩展属性 CustomProperty1
.AddProperty("CustomProperty2", new { Name = "Jack", Age = 18 }) //自定义扩展属性 CustomProperty2 .AddProperty("CustomProperty2", new { Name = "Jack", Age = 18 }) //自定义扩展属性 CustomProperty2
``` ```
- 格式化输出: - 格式化输出:
``` C# ``` C#
...@@ -227,7 +219,6 @@ ...@@ -227,7 +219,6 @@
## 五、使用 `APM` 扩展日志 —— `SkyWalking` ## 五、使用 `APM` 扩展日志 —— `SkyWalking`
1. 客户端 1. 客户端
- SkyAPM.Agent.AspNetCore - SkyAPM.Agent.AspNetCore
- SkyAPM.Agent.GeneralHost - SkyAPM.Agent.GeneralHost
- SkyAPM.Agent.AspNet - SkyAPM.Agent.AspNet
...@@ -249,9 +240,7 @@ ...@@ -249,9 +240,7 @@
> **特别注意:** 配置文件 `skyapm.json` 复制属性 更改为 `始终复制` 或 `较新则复制` > **特别注意:** 配置文件 `skyapm.json` 复制属性 更改为 `始终复制` 或 `较新则复制`
1. 使用方法 1. 使用方法
- 通过环境变量 `ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore` 配置 `Aspnetcore` 客户端的入口程序集 - 通过环境变量 `ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=SkyAPM.Agent.AspNetCore` 配置 `Aspnetcore` 客户端的入口程序集
- 通过环境变量 `SKYWALKING__SERVICENAME=sample_app` 配置服务名称,不配置则使用 `skyapm.json``ServiceName` - 通过环境变量 `SKYWALKING__SERVICENAME=sample_app` 配置服务名称,不配置则使用 `skyapm.json``ServiceName`
1. 自定义 `Diagnostic` 上传跟踪信息 1. 自定义 `Diagnostic` 上传跟踪信息
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