Reference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#cloud_logging_option
def cloud_logging_option() -> ::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption
Returns
-
(::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption) — Optional. When
destination
is set toCLOUD_LOGGING
, you can optionally set this field to configure additional settings for Cloud Logging.
#cloud_logging_option=
def cloud_logging_option=(value) -> ::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption
Parameter
-
value (::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption) — Optional. When
destination
is set toCLOUD_LOGGING
, you can optionally set this field to configure additional settings for Cloud Logging.
Returns
-
(::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption) — Optional. When
destination
is set toCLOUD_LOGGING
, you can optionally set this field to configure additional settings for Cloud Logging.
#destination
def destination() -> ::Google::Cloud::Batch::V1::LogsPolicy::Destination
Returns
- (::Google::Cloud::Batch::V1::LogsPolicy::Destination) — If and where logs should be saved.
#destination=
def destination=(value) -> ::Google::Cloud::Batch::V1::LogsPolicy::Destination
Parameter
- value (::Google::Cloud::Batch::V1::LogsPolicy::Destination) — If and where logs should be saved.
Returns
- (::Google::Cloud::Batch::V1::LogsPolicy::Destination) — If and where logs should be saved.
#logs_path
def logs_path() -> ::String
Returns
-
(::String) — When
destination
is set toPATH
, 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 withmountPath
set to/mnt/disks/my-bucket
, you can write logs to the root directory of theremotePath
of that bucket by setting this field to/mnt/disks/my-bucket/
.
#logs_path=
def logs_path=(value) -> ::String
Parameter
-
value (::String) — When
destination
is set toPATH
, 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 withmountPath
set to/mnt/disks/my-bucket
, you can write logs to the root directory of theremotePath
of that bucket by setting this field to/mnt/disks/my-bucket/
.
Returns
-
(::String) — When
destination
is set toPATH
, 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 withmountPath
set to/mnt/disks/my-bucket
, you can write logs to the root directory of theremotePath
of that bucket by setting this field to/mnt/disks/my-bucket/
.