Using Console
Using CLI
<bucket-name>
with the name of the bucket that you created in step 2, and <log-bucket-name>
and <log-object-prefix>
with the name of the bucket and object prefix where you want to store the logs.
<sink-name>
with a name for the new sink, and <bucket-name>
with the name of the bucket that you created in step 2.
logging.logWriter
role to the sink service account:
<project-id>
with the ID of the project that contains the bucket, and <sink-service-account>
with the email address of the service account that was created for the sink.
Using Python
<path-to-service-account-key>
, <project-name>
, and <bucket-name>
with the actual values.<script-name>
with the actual name of the Python script.