Reputation: 441
Looking at OpenWhisk samples, it seems like JavaScript-based actions can use console.log()
to report log information that would be collected and accessible through the activation API.
However, it is not clear how to report logs from Java-based or Docker-based actions.
Upvotes: 2
Views: 211
Reputation: 3120
Logs for OpenWhisk actions are taken from stdout
and stderr
of the action. That mechanism applies to all runtimes.
The Docker-based approach assumes that stdout
of the program you run is the result of the action. Thus it takes stdout
and tries to JSON-parse it. The result will be the result of the action itself rather than logs. Currently there is no way to write logs in a docker-based action.
Upvotes: 2