Skip to content

Commit 2e27707

Browse files
committed
Log value of FUNCTIONS_EXTENSION_VERSION on host start. Fixes #1835
1 parent f6b4c04 commit 2e27707

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/WebJobs.Script/EnvironmentSettingNames.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ public static class EnvironmentSettingNames
2323
public const string AzureWebJobsSecretStorageType = "AzureWebJobsSecretStorageType";
2424
public const string AppInsightsInstrumentationKey = "APPINSIGHTS_INSTRUMENTATIONKEY";
2525
public const string ProxySiteExtensionEnabledKey = "ROUTING_EXTENSION_VERSION";
26+
public const string FunctionsExtensionVersion = "FUNCTIONS_EXTENSION_VERSION";
2627
}
2728
}

src/WebJobs.Script/Host/ScriptHostManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ public bool CanInvoke()
143143

144144
OnHostCreated();
145145

146-
string message = string.Format("Starting Host (HostId={0}, Version={1}, ProcessId={2}, Debug={3}, Attempt={4})",
147-
newInstance.ScriptConfig.HostConfig.HostId, ScriptHost.Version, Process.GetCurrentProcess().Id, newInstance.InDebugMode.ToString(), consecutiveErrorCount);
146+
string message = string.Format("Starting Host (HostId={0}, Version={1}, ProcessId={2}, Debug={3}, Attempt={4}, FunctionsExtensionVersion={5})",
147+
newInstance.ScriptConfig.HostConfig.HostId, ScriptHost.Version, Process.GetCurrentProcess().Id, newInstance.InDebugMode.ToString(), consecutiveErrorCount,
148+
_settingsManager.GetSetting(EnvironmentSettingNames.FunctionsExtensionVersion));
148149
_traceWriter?.Info(message);
149150
_logger?.LogInformation(message);
150151

test/WebJobs.Script.Tests.Integration/Host/WebScriptHostManagerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public Fixture()
319319
"Info Host lock lease acquired by instance ID '(.+)'",
320320
"Info Function 'Excluded' is marked as excluded",
321321
@"Info Generating ([0-9]+) job function\(s\)",
322-
@"Info Starting Host \(HostId=function-tests-node, Version=(.+), ProcessId=[0-9]+, Debug=False, Attempt=0\)",
322+
@"Info Starting Host \(HostId=function-tests-node, Version=(.+), ProcessId=[0-9]+, Debug=False, Attempt=0, FunctionsExtensionVersion=\)",
323323
"Info WebJobs.Indexing Found the following functions:",
324324
"Info The next 5 occurrences of the schedule will be:",
325325
"Info WebJobs.Host Job host started",

0 commit comments

Comments
 (0)