Using Console
Using CLI
gsutil logging set on gs://[BUCKET_NAME]
Replace [BUCKET_NAME]
with the name of the bucket you want to enable access logs for.
gsutil mb -p [PROJECT_ID] -c regional -l [REGION] gs://[BUCKET_NAME]
Replace [PROJECT_ID]
with your GCP project ID, [REGION]
with the region where you want to create the bucket, and [BUCKET_NAME]
with the name of the bucket you want to create.
[BUCKET_NAME]
with the name of the bucket you want to enable access logs for.
gsutil ls -la gs://[BUCKET_NAME]/
Replace [BUCKET_NAME]
with the name of the bucket you created in step 3.
Using Python