public sealed class LogsPolicy : IMessage<LogsPolicy>, IEquatable<LogsPolicy>, IDeepCloneable<LogsPolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1 API class LogsPolicy.
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.
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-07 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eLogsPolicy\u003c/code\u003e class within the Google Cloud Batch v1 API, outlining its purpose in managing job log preservation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLogsPolicy\u003c/code\u003e class, part of the \u003ccode\u003eGoogle.Cloud.Batch.V1\u003c/code\u003e namespace, includes properties like \u003ccode\u003eCloudLoggingOption\u003c/code\u003e, \u003ccode\u003eDestination\u003c/code\u003e, and \u003ccode\u003eLogsPath\u003c/code\u003e to define where and how logs are stored.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLogsPolicy\u003c/code\u003e class has multiple versions available, ranging from the latest version 2.13.0 down to version 1.0.0, with links provided to each version's documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLogsPolicy\u003c/code\u003e implements various interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, indicating its capabilities for data handling, comparison, cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLogsPolicy\u003c/code\u003e class offers two constructors: a default constructor \u003ccode\u003eLogsPolicy()\u003c/code\u003e and a copy constructor \u003ccode\u003eLogsPolicy(LogsPolicy other)\u003c/code\u003e, allowing for new instances to be created or cloned from existing ones.\u003c/p\u003e\n"]]],[],null,[]]