Using gsutil, you can check logging by using the logging get command:
gsutil logging get gs://example-bucket
You can also save the logging configurations to a file:
gsutil logging get gs://example-bucket > your_logging_configuration_file
If logging is enabled, the server returns the logging configuration in the response:
{"logBucket": "example-logs-bucket", "logObjectPrefix": "log_object_prefix"}
If logging is not enabled, the following is returned:
gs://example-bucket/ has no logging configuration.
Hope it helps!!
To know more about Google Cloud, join Google Cloud platform certification course today.
Thank You!