serverless-express
serverless-express copied to clipboard
How can I use context.log in Azure functions?
I don't know how to use context.log with serverless-express and Azure functions. Please tell me how to use context.log.
Can you use getCurrentInvoke().context? See https://github.com/vendia/serverless-express/blob/mainline/examples/azure-http-function-v4/HttpExample/app.js#L23
Thank you for your reply. But getCurrentInvoke().context doesn't work.
[Code]
[Error]

@Jingasan Because the azure way to pass the arguments to the handler (see here), context inside getCurrentInvoke() represents the event and event represents the context.
So to make this work, call getCurrentInvoke().event.log.
@brettstack Also the azure examples are broken because they don't reflect current behavior, should I create an issue to track the fixes?
@H4ad Thank you for telling me about it. It works !