# Batch V1 API - Class Google::Cloud::Batch::V1::LogsPolicy (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.21.0 0.20.1 0.19.2 0.18.3 0.17.4 0.16.2 0.15.1 0.14.0 0.13.1 0.12.0 0.11.1 0.10.5 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.3 0.3.0 0.2.0 0.1.0 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/Google-Cloud-Batch-V1-LogsPolicy-CloudLoggingOption)) --- Optional. When `destination` is set to `CLOUD_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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/Google-Cloud-Batch-V1-LogsPolicy-CloudLoggingOption)) --- Optional. When `destination` is set to `CLOUD_LOGGING`, you can optionally set this field to configure additional settings for Cloud Logging.
**Returns**

- ([::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/Google-Cloud-Batch-V1-LogsPolicy-CloudLoggingOption)) --- Optional. When `destination` is set to `CLOUD_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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/Google-Cloud-Batch-V1-LogsPolicy-Destination)) --- If and where logs should be saved.
**Returns**

- ([::Google::Cloud::Batch::V1::LogsPolicy::Destination](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-batch-v1/latest/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 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/`.

### #logs_path=

    def logs_path=(value) -> ::String

**Parameter**

- **value** (::String) --- 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/`.
**Returns**

- (::String) --- 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/`.