Skip to content

Commit a5a8132

Browse files
authored
remove magic string, fix log formatting (#908)
1 parent 1fcb262 commit a5a8132

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/DurableWorker/DurableController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internal class DurableController
3131
private readonly ILogger _logger;
3232

3333
private bool isExternalDFSdkEnabled { get; } =
34-
PowerShellWorkerConfiguration.GetBoolean("ExternalDurablePowerShellSDK") ?? false;
34+
PowerShellWorkerConfiguration.GetBoolean(Utils.ExternalDurableSdkEnvVariable) ?? false;
3535

3636
public DurableController(
3737
DurableFunctionInfo durableDurableFunctionInfo,
@@ -81,7 +81,7 @@ private void tryEnablingExternalSDK()
8181
else if (isExternalSdkLoaded)
8282
{
8383
// External SDK is in the session, but customer did not explicitly enable it. Report the potential of runtime errors.
84-
_logger.Log(isUserOnlyLog: false, LogLevel.Error, String.Format(PowerShellWorkerStrings.PotentialDurableSDKClash, Utils.ExternalDurableSdkName));
84+
_logger.Log(isUserOnlyLog: false, LogLevel.Error, String.Format(PowerShellWorkerStrings.PotentialDurableSDKClash, Utils.ExternalDurableSdkName, Utils.ExternalDurableSdkEnvVariable));
8585
}
8686
}
8787

src/Utility/Utils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ internal class Utils
2828
internal const string ExternalDurableSdkName = "AzureFunctions.PowerShell.Durable.SDK";
2929
internal const string IsOrchestrationFailureKey = "IsOrchestrationFailure";
3030
internal const string TracePipelineObjectCmdlet = "Microsoft.Azure.Functions.PowerShellWorker\\Trace-PipelineObject";
31+
internal const string ExternalDurableSdkEnvVariable = "ExternalDurablePowerShellSDK";
3132

3233
internal readonly static object BoxedTrue = (object)true;
3334
internal readonly static object BoxedFalse = (object)false;

0 commit comments

Comments
 (0)