File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 66using Microsoft . FeatureManagement ;
77using System ;
88using System . Diagnostics ;
9+ using System . Reflection ;
910
1011namespace extractor ;
1112
@@ -51,12 +52,13 @@ private static RunApplication GetRunApplication(IServiceProvider provider)
5152 var featureManager = provider . GetRequiredService < IFeatureManager > ( ) ;
5253 var activitySource = provider . GetRequiredService < ActivitySource > ( ) ;
5354 var logger = provider . GetRequiredService < ILogger > ( ) ;
55+ var releaseVersion = Assembly . GetEntryAssembly ( ) ? . GetCustomAttribute < AssemblyFileVersionAttribute > ( ) ? . Version ?? "0.0.0" ;
5456
5557 return async cancellationToken =>
5658 {
5759 using var activity = activitySource . StartActivity ( nameof ( RunApplication ) ) ;
5860
59- logger . LogInformation ( "Running extractor..." ) ;
61+ logger . LogInformation ( "Running extractor {ReleaseVersion} ..." , releaseVersion ) ;
6062
6163 await extractNamedValues ( cancellationToken ) ;
6264 await extractTags ( cancellationToken ) ;
Original file line number Diff line number Diff line change 66using Microsoft . FeatureManagement ;
77using System ;
88using System . Diagnostics ;
9+ using System . Reflection ;
910
1011namespace publisher ;
1112
@@ -156,11 +157,14 @@ private static RunApplication GetRunApplication(IServiceProvider provider)
156157 var activitySource = provider . GetRequiredService < ActivitySource > ( ) ;
157158 var logger = provider . GetRequiredService < ILogger > ( ) ;
158159
160+ var releaseVersion = Assembly . GetEntryAssembly ( ) ? . GetCustomAttribute < AssemblyFileVersionAttribute > ( ) ? . Version ?? "0.0.0" ;
161+
162+
159163 return async cancellationToken =>
160164 {
161165 using var activity = activitySource . StartActivity ( nameof ( RunApplication ) ) ;
162166
163- logger . LogInformation ( "Running publisher..." ) ;
167+ logger . LogInformation ( "Running publisher {ReleaseVersion} ..." , releaseVersion ) ;
164168
165169 await putNamedValues ( cancellationToken ) ;
166170 await putGateways ( cancellationToken ) ;
You can’t perform that action at this time.
0 commit comments