Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
889 stars 528 forks source link

[Chore] Azure Functions API: switch `console.` to `context.` #405

Closed dfberry closed 10 months ago

dfberry commented 11 months ago

In Azure Functions, console.x output is only available when streaming log or at the Function app level. The context.x output is available at the API level within the Function app.

There are several console.x calls in the startup code which would only be helpful in active debugging. Switch to using context.x which means it needs to be passed down from the api to the startup functionality. It could also, potentially, be rolled into the logger module which handles output to applicationInsights.

glaucia86 commented 11 months ago

@dfberry do you mean the api-v4 the new api?

dfberry commented 11 months ago

@glaucia86 Its true for either version but no need to update the v3. Once the updates for v4 is merged, the api-v4 becomes api. So only func v4 pm needs to be updated.

glaucia86 commented 11 months ago

I can take this one, once this PR is merged: https://github.com/Azure-Samples/contoso-real-estate/pull/404

anfibiacreativa commented 10 months ago

Closed due to inactivity.