If the job has been set up to write logs to Cloud Logging, this sample retrieves its logs. Logs can provide information that is useful for analyzing your jobs. For example, logs can help you debug a failed job.
Explore further
For detailed documentation that includes this code sample, see the following:
Code sample
C++
For more information, see the Batch C++ API reference documentation.
To authenticate to Batch, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Go
For more information, see the Batch Go API reference documentation.
To authenticate to Batch, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
For more information, see the Batch Java API reference documentation.
To authenticate to Batch, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
For more information, see the Batch Python API reference documentation.
To authenticate to Batch, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
What's next
To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.