openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

Where is the output for console.log of an action?

Open mango009 opened this issue 2 years ago • 2 comments

Hi, sorry but I cannot find solution on the web for this problem. I'm using console.log in my node.js action as follows:

async function main(params) {
  console.log('incoming request params:', params);
  return {
    headers: {
      'Content-Type': 'application/json'
    },
    body: params,
    statusCode: 200
  }
}

But I cannot find the output of console.log if I use wsk -I activation logs <ID> (even when the function failed). It always comes back as blank.

mango009 avatar Apr 12 '22 02:04 mango009

Are you using intra-concurrency? If yes, currently logs are not supported. https://github.com/apache/openwhisk/blob/master/docs/concurrency.md

style95 avatar Apr 12 '22 08:04 style95

No I'm not using intra-concurrency. I didn't specify the -c flag when creating the action so the concurrency is default to 1

mango009 avatar Apr 12 '22 21:04 mango009