2

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.

Alex Glikson
  • 401
  • 4
  • 13

1 Answers1

2

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.

markusthoemmes
  • 3,080
  • 14
  • 23