Azure Function Linux not updating host.json file

David Gonzalez D 61 Reputation points
2022-11-03T00:39:01.463+00:00

Hi i have an azure function wich run in linux, the problem is i need to update the host.json file to add the log level settings, in windows azure function, there are no problems because you can edit in azure portal directly but with linux i don´t have this option. I try to redeploy my function app but, for some reason, the script don't update my host.json file, updates correctly all the internal logic of the app but the host.json file not update. Is there any extra config? Or any option to update my host.json file??

My bash update script is this

cd [##path to project##]
git checkout [##branch code##]
git pull origin [##branch code##]
cd [##local path tho project##]
dotnet restore --configfile [##path to nugget config file##]
func azure functionapp fetch-app-settings $_FUNCTION
func azure functionapp publish $_FUNCTION --publish-local-settings --overwrite-settings --csharp

thanks for support

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
0 comments No comments
{count} votes

Accepted answer
  1. MikeUrnun 9,777 Reputation points Moderator
    2022-11-08T00:15:03.14+00:00

    Hello @David Gonzalez D - it looks like you're fetching the settings on Azure and then publishing them back again as-is. Per the doc, func azure functionapp fetch-app-settings <APP_NAME> will download your remote settings into local.settings.json file: https://learn.microsoft.com/en-us/azure/azure-functions/functions-core-tools-reference?tabs=v2#func-azure-functionapp-fetch-app-settings

    And executing the func azure functionapp publish <FunctionAppName> next with the --publish-local-settings flag will publish same settings in local.settings.json back to Azure: https://learn.microsoft.com/en-us/azure/azure-functions/functions-core-tools-reference?tabs=v2#func-azure-functionapp-publish


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.