node.js Azure function context log not logging synchronously

Dy Zapra, Keisha Marie 20 Reputation points

I expect the following to log in order from top to bottom but results show that they're not in order

// Azure function handler
export const browseIssues = context => {{ a: 'first object', b: { q: 'test 1' } });{ a: 'second object', b: { q: 'test 2' } });{ a: 'third object', b: { q: 'test 3' } });{ a: 'first string', b: { q: 'test 1' } }));{ a: 'second string', b: { q: 'test 2' } }));{ a: 'third string', b: { q: 'test 3' } }));'first simple string');'second simple string');'third simple string');


Screenshot 2023-03-12 at 22.52.56

Here's a bare bone repository where this is reproducible

Any ideas on why this is happening and how to remedy this? Issue seems to be confined in azure context's log as console.log logs synchronously.

Node version: v18.12.1

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,936 questions
0 comments No comments
{count} votes