Google Cloud Functions automatically capture stdout (and stderr), and send them to cloud logging.
It is possible to output structured JSON log records to stdout, which are processed by cloud logging to map to the Logging special fields
An advantage of logging to process.stdout in cloud functions is that the function's execution_id is added to the logging to link function invocations (while this is accessible in HTTP cloud functions, but not from Pub/Sub or Cloud Event background functions.
A second advantage is that as this does not use the Logging API there does not need to be an IAM/Auth for the cloud function's service account.
A useful feature would be a separate logging provider which instead of logging via the Cloud Logging API, instead logs to process.stdout with the structured JSON record expected by GCP.
Alternatives:
Write my own logging wrapper that creates JSON structured logs.... yuk.
Screenshot from cloud logging attached showing 2 identical logs from a cloud function - the first is from via the Bunyan logging provider for GCP which logs via cloud logging API, the second is with bunyan streaming to process.stdout -- its the raw log message, but cloud logging links the function invocation ID, and gives the ability to trace all logs for the function.

Google Cloud Functions automatically capture stdout (and stderr), and send them to cloud logging.
It is possible to output structured JSON log records to stdout, which are processed by cloud logging to map to the Logging special fields
An advantage of logging to process.stdout in cloud functions is that the function's execution_id is added to the logging to link function invocations (while this is accessible in HTTP cloud functions, but not from Pub/Sub or Cloud Event background functions.
A second advantage is that as this does not use the Logging API there does not need to be an IAM/Auth for the cloud function's service account.
A useful feature would be a separate logging provider which instead of logging via the Cloud Logging API, instead logs to process.stdout with the structured JSON record expected by GCP.
Alternatives:
Write my own logging wrapper that creates JSON structured logs.... yuk.
Screenshot from cloud logging attached showing 2 identical logs from a cloud function - the first is from via the Bunyan logging provider for GCP which logs via cloud logging API, the second is with bunyan streaming to process.stdout -- its the raw log message, but cloud logging links the function invocation ID, and gives the ability to trace all logs for the function.