File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Diagnostics/PostSharp.Samples.Logging.ElasticStack Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1111 <ItemGroup >
1212 <PackageReference Include =" PostSharp.Patterns.Diagnostics.HttpClient" Version =" 6.8.3-preview-4aa2a9" />
1313 <PackageReference Include =" Serilog.Extensions.Logging" Version =" 3.0.1" />
14- <PackageReference Include =" Serilog.Sinks.Async" Version =" 1.4.0" />
1514 <PackageReference Include =" Serilog.Sinks.Console" Version =" 3.1.1" />
1615 <PackageReference Include =" PostSharp.Patterns.Diagnostics" Version =" 6.8.3-preview-4aa2a9" />
1716 <PackageReference Include =" PostSharp.Patterns.Diagnostics.Serilog" Version =" 6.8.3-preview-4aa2a9" />
Original file line number Diff line number Diff line change 66using Serilog ;
77using Serilog . Sinks . Elasticsearch ;
88using System ;
9+ using System . Reflection ;
910using System . Threading . Tasks ;
1011using static PostSharp . Patterns . Diagnostics . FormattedMessageBuilder ;
1112
@@ -23,7 +24,7 @@ private static async Task Main()
2324
2425 // Configure Serilog to write to the console and to Elastic Search.
2526 using ( var logger = new LoggerConfiguration ( )
26- . Enrich . WithProperty ( "Application" , "Client" )
27+ . Enrich . WithProperty ( "Application" , typeof ( Program ) . Assembly . GetName ( ) . Name )
2728 . MinimumLevel . Debug ( )
2829 . WriteTo . Elasticsearch ( new ElasticsearchSinkOptions ( new Uri ( "http://localhost:9200" ) )
2930 {
Original file line number Diff line number Diff line change 1313 </ItemGroup >
1414 <ItemGroup >
1515 <PackageReference Include =" Serilog.AspNetCore" Version =" 3.2.0" />
16- <PackageReference Include =" Serilog.Sinks.Async" Version =" 1.4.0" />
1716 <PackageReference Include =" Serilog.Sinks.Console" Version =" 3.1.1" />
1817 <PackageReference Include =" PostSharp.Patterns.Diagnostics" Version =" 6.8.3-preview-4aa2a9" />
1918 <PackageReference Include =" PostSharp.Patterns.Diagnostics.Serilog" Version =" 6.8.3-preview-4aa2a9" />
Original file line number Diff line number Diff line change 99using Serilog ;
1010using Serilog . Sinks . Elasticsearch ;
1111using System ;
12+ using System . Reflection ;
1213
1314[ assembly: Log ]
1415
@@ -23,7 +24,7 @@ public static void Main(string[] args)
2324
2425 // Configure Serilog to write to the console and to Elastic Search.
2526 using ( var logger = new LoggerConfiguration ( )
26- . Enrich . WithProperty ( "Application" , "Microservice" )
27+ . Enrich . WithProperty ( "Application" , typeof ( Program ) . Assembly . GetName ( ) . Name )
2728 . MinimumLevel . Debug ( )
2829 . WriteTo . Elasticsearch ( new ElasticsearchSinkOptions ( new Uri ( "http://localhost:9200" ) )
2930 {
You can’t perform that action at this time.
0 commit comments