From 1f8480b41fccc09b3efe5ff2ec7d4eb9ba26c179 Mon Sep 17 00:00:00 2001 From: Lilian Kasem Date: Fri, 29 Aug 2025 12:07:30 -0700 Subject: [PATCH] Log the resolved worker runtime and `local.settings.json` location --- release_notes.md | 4 ++-- src/Cli/func/Common/SecretsManager.cs | 4 ++++ src/Cli/func/Helpers/WorkerRuntimeLanguageHelper.cs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/release_notes.md b/release_notes.md index 20324c995..099c92198 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,4 +1,4 @@ -# Azure Functions CLI 4.2.2 +# Azure Functions CLI 4.2.3 #### Host Version @@ -7,4 +7,4 @@ #### Changes -- Fix .NET template install bug (#4612) +- Log the resolved worker runtime and `local.settings.json` location, if found. diff --git a/src/Cli/func/Common/SecretsManager.cs b/src/Cli/func/Common/SecretsManager.cs index b4128538f..27ab787f2 100644 --- a/src/Cli/func/Common/SecretsManager.cs +++ b/src/Cli/func/Common/SecretsManager.cs @@ -3,7 +3,9 @@ using Azure.Functions.Cli.Helpers; using Azure.Functions.Cli.Interfaces; +using Colors.Net; using Microsoft.Azure.WebJobs.Script; +using Microsoft.Build.Logging; namespace Azure.Functions.Cli.Common { @@ -24,6 +26,8 @@ public static string AppSettingsFilePath secretsFile, }); var secretsFilePath = Path.Combine(rootPath, secretsFile); + + ColoredConsole.WriteLine($"{secretsFile} found in root directory ({rootPath})."); return secretsFilePath; } } diff --git a/src/Cli/func/Helpers/WorkerRuntimeLanguageHelper.cs b/src/Cli/func/Helpers/WorkerRuntimeLanguageHelper.cs index 233c3384d..c0d22dd40 100644 --- a/src/Cli/func/Helpers/WorkerRuntimeLanguageHelper.cs +++ b/src/Cli/func/Helpers/WorkerRuntimeLanguageHelper.cs @@ -180,7 +180,9 @@ public static WorkerRuntime GetCurrentWorkerRuntimeLanguage(ISecretsManager secr try { - return NormalizeWorkerRuntime(setting); + WorkerRuntime workerRuntime = NormalizeWorkerRuntime(setting); + ColoredConsole.WriteLine($"Resolving worker runtime to '{GetRuntimeMoniker(workerRuntime)}'."); + return workerRuntime; } catch {