data_henrik
data_henrik

Reputation: 17176

How can I check that Openwhisk (IBM Cloud Functions) gets invoked?

I have a web application that uploads data to a Cloudant database. Change events should trigger OpenWhisk / IBM Cloud Functions activations or actions. How can I check that OpenWhisk is invoked, is there a debugging mechanism? I tried using the dashboard, but is there something I can use on the command line?

I am experimenting with node.js and Docker actions, so it would be great if the solution would be independent of whether the action is in node.js, Swift or a Docker container.

Upvotes: 1

Views: 370

Answers (1)

data_henrik
data_henrik

Reputation: 17176

I found it in the OpenWhisk documentation:

wsk activation poll

does the trick. It streams the activation log to my shell:

wsk activation poll

Hit Ctrl-C to exit.
Polling for logs
Activation: echo (36e3d136f55d439e8e901b4d8b9dxxxx)
Activation: wordCount (e001309b627c451991f477ab349cxxxx) 
2016-03-18T15:10:38.529050288Z stdout: The message 'John says hello to OpenWhisk and the wonderful world of Cloud Computing' has 12 words

Upvotes: 2

Related Questions