The binaris cloud logs standard output and error of each function invocation. Let’s tweak the hello
function to see logging in action.
The function logs its parameter, which helps us understand a specific name is returned.
Deploy, invoke and log
The last four lines were generated by our invocation. As expected, we logged a None query string, a firstName body, and a firstName name.
The last log line with the 599.146 us duration measurement is autogenerated per invocation. The first log lines in the bn logs output were genrated by your first calls to hello during the previous chapters of this tutorial.
bn logs can show logs in real time, in a way similar to tail -f on a local file. To try it out, let’s split our terminal or open a new tab or window.
In the first terminal window, type:
In a separate terminal window, invoke the function a few times:
The first terminal shows the log shortly after each invocation: