@@ -52,8 +52,9 @@ public SecretManager(ISecretsRepository repository, IKeyValueConverterFactory ke
52
52
GetHostSecretsAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
53
53
}
54
54
55
- _traceWriter . Info ( Resources . TraceSecretsRepo , repository . ToString ( ) ) ;
56
- _logger ? . LogInformation ( Resources . TraceSecretsRepo , repository . ToString ( ) ) ;
55
+ string message = string . Format ( Resources . TraceSecretsRepo , repository . ToString ( ) ) ;
56
+ _traceWriter . Info ( message ) ;
57
+ _logger ? . LogInformation ( message ) ;
57
58
}
58
59
59
60
public void Dispose ( )
@@ -153,10 +154,9 @@ public async virtual Task<IDictionary<string, string>> GetFunctionSecretsAsync(s
153
154
if ( secrets == null )
154
155
{
155
156
// no secrets exist for this function so generate them
156
- string message = string . Format ( Resources . TraceFunctionSecretGeneration , functionName ) ;
157
- _traceWriter . Info ( message , traceProperties ) ;
158
-
159
- _logger ? . LogInformation ( message ) ;
157
+ string messageGeneratoin = string . Format ( Resources . TraceFunctionSecretGeneration , functionName ) ;
158
+ _traceWriter . Info ( messageGeneratoin , traceProperties ) ;
159
+ _logger ? . LogInformation ( messageGeneratoin ) ;
160
160
secrets = new FunctionSecrets
161
161
{
162
162
Keys = new List < Key >
@@ -175,18 +175,18 @@ public async virtual Task<IDictionary<string, string>> GetFunctionSecretsAsync(s
175
175
}
176
176
catch ( CryptographicException )
177
177
{
178
- string message = string . Format ( Resources . TraceNonDecryptedFunctionSecretRefresh , functionName ) ;
179
- _traceWriter . Info ( message , traceProperties ) ;
180
- _logger ? . LogInformation ( message ) ;
178
+ string messageNonDecrypted = string . Format ( Resources . TraceNonDecryptedFunctionSecretRefresh , functionName ) ;
179
+ _traceWriter . Info ( messageNonDecrypted , traceProperties ) ;
180
+ _logger ? . LogInformation ( messageNonDecrypted ) ;
181
181
await PersistSecretsAsync ( secrets , functionName , true ) ;
182
182
await RefreshSecretsAsync ( secrets , functionName ) ;
183
183
}
184
184
185
185
if ( secrets . HasStaleKeys )
186
186
{
187
- string message = string . Format ( Resources . TraceStaleFunctionSecretRefresh , functionName ) ;
188
- _traceWriter . Info ( message ) ;
189
- _logger ? . LogInformation ( message ) ;
187
+ string messageStaleFunction = string . Format ( Resources . TraceStaleFunctionSecretRefresh , functionName ) ;
188
+ _traceWriter . Info ( messageStaleFunction ) ;
189
+ _logger ? . LogInformation ( messageStaleFunction ) ;
190
190
await RefreshSecretsAsync ( secrets , functionName ) ;
191
191
}
192
192
@@ -206,8 +206,9 @@ public async virtual Task<IDictionary<string, string>> GetFunctionSecretsAsync(s
206
206
. ToDictionary ( kv => kv . Key , kv => kv . Value ) ;
207
207
}
208
208
209
- _traceWriter . Info ( Resources . TraceFunctionsKeysLoaded , functionName ) ;
210
- _logger ? . LogInformation ( Resources . TraceFunctionsKeysLoaded , functionName ) ;
209
+ string messageLoaded = string . Format ( Resources . TraceFunctionsKeysLoaded , functionName ) ;
210
+ _traceWriter . Info ( messageLoaded ) ;
211
+ _logger ? . LogInformation ( messageLoaded ) ;
211
212
212
213
return functionSecrets ;
213
214
}
0 commit comments