Reputation: 457
I know console.log
is synchronous and can slow down your application, I want to know if this is the case with Google Cloud Functions.
I saw on a Github thread that logs on GCF are written to Stack Driver and are non-blocking. I need a confirmation that this is true.
Upvotes: 0
Views: 144
Reputation: 820
About the first part of your post, console.log is not standardized, so the behavior is rather undefined, and can be changed easily from release to release of the developer tool. About if it can slow the Cloud function, the answer is no, since console.log is an event that takes place outside the function and this will not prevent the function progress.
For the second part, Logs for Cloud Functions are viewable in the Stackdriver Logging UI, and via the gcloud command-line tool. There is typically a slight delay between when log entries are created and when they show up in Stackdriver, but the post is correct, this is true.
Upvotes: 1