LogsPolicy describes if and how a job's logs are preserved. Logs
include information that is automatically written by the Batch
service agent and any information that you configured the job's
runnables to write to the stdout or stderr streams.
str
When destination is set to PATH, you must set this
field to the path where you want logs to be saved. This path
can point to a local directory on the VM or (if congifured)
a directory under the mount path of any Cloud Storage
bucket, network file system (NFS), or writable persistent
disk that is mounted to the job. For example, if the job has
a bucket with mountPath set to /mnt/disks/my-bucket,
you can write logs to the root directory of the
remotePath of that bucket by setting this field to
/mnt/disks/my-bucket/.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class LogsPolicy (0.17.36)\n\nVersion latestkeyboard_arrow_down\n\n- [0.17.36 (latest)](/python/docs/reference/batch/latest/google.cloud.batch_v1.types.LogsPolicy)\n- [0.17.35](/python/docs/reference/batch/0.17.35/google.cloud.batch_v1.types.LogsPolicy)\n- [0.16.0](/python/docs/reference/batch/0.16.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.15.0](/python/docs/reference/batch/0.15.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.14.0](/python/docs/reference/batch/0.14.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.13.0](/python/docs/reference/batch/0.13.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.12.0](/python/docs/reference/batch/0.12.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.11.0](/python/docs/reference/batch/0.11.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.10.0](/python/docs/reference/batch/0.10.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.9.0](/python/docs/reference/batch/0.9.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.8.1](/python/docs/reference/batch/0.8.1/google.cloud.batch_v1.types.LogsPolicy)\n- [0.7.0](/python/docs/reference/batch/0.7.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.6.0](/python/docs/reference/batch/0.6.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.5.0](/python/docs/reference/batch/0.5.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.4.1](/python/docs/reference/batch/0.4.1/google.cloud.batch_v1.types.LogsPolicy)\n- [0.3.2](/python/docs/reference/batch/0.3.2/google.cloud.batch_v1.types.LogsPolicy)\n- [0.2.0](/python/docs/reference/batch/0.2.0/google.cloud.batch_v1.types.LogsPolicy)\n- [0.1.2](/python/docs/reference/batch/0.1.2/google.cloud.batch_v1.types.LogsPolicy) \n\n LogsPolicy(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nLogsPolicy describes if and how a job's logs are preserved. Logs\ninclude information that is automatically written by the Batch\nservice agent and any information that you configured the job's\nrunnables to write to the `stdout` or `stderr` streams.\n\nClasses\n-------\n\n### CloudLoggingOption\n\n CloudLoggingOption(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\n`CloudLoggingOption` contains additional settings for Cloud\nLogging logs generated by Batch job.\n\n### Destination\n\n Destination(value)\n\nThe destination (if any) for logs."]]