Class: Google::Cloud::Batch::V1::LogsPolicy
- Inherits:
-
Object
- Object
- Google::Cloud::Batch::V1::LogsPolicy
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/batch/v1/job.rb
Overview
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.
Defined Under Namespace
Modules: Destination Classes: CloudLoggingOption
Instance Attribute Summary collapse
-
#cloud_logging_option ⇒ ::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption
Optional.
-
#destination ⇒ ::Google::Cloud::Batch::V1::LogsPolicy::Destination
If and where logs should be saved.
-
#logs_path ⇒ ::String
When
destination
is set toPATH
, you must set this field to the path where you want logs to be saved.
Instance Attribute Details
#cloud_logging_option ⇒ ::Google::Cloud::Batch::V1::LogsPolicy::CloudLoggingOption
Returns Optional. When destination
is set to CLOUD_LOGGING
, you can optionally
set this field to configure additional settings for Cloud Logging.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'proto_docs/google/cloud/batch/v1/job.rb', line 109 class LogsPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # `CloudLoggingOption` contains additional settings for Cloud Logging logs # generated by Batch job. # @!attribute [rw] use_generic_task_monitored_resource # @return [::Boolean] # Optional. Set this field to `true` to change the [monitored resource # type](https://cloud.google.com/monitoring/api/resources) for # Cloud Logging logs generated by this Batch job from # the # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) # type to the formerly used # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) # type. class CloudLoggingOption include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The destination (if any) for logs. module Destination # (Default) Logs are not preserved. DESTINATION_UNSPECIFIED = 0 # Logs are streamed to Cloud Logging. Optionally, you can configure # additional settings in the `cloudLoggingOption` field. CLOUD_LOGGING = 1 # Logs are saved to the file path specified in the `logsPath` field. PATH = 2 end end |
#destination ⇒ ::Google::Cloud::Batch::V1::LogsPolicy::Destination
Returns If and where logs should be saved.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'proto_docs/google/cloud/batch/v1/job.rb', line 109 class LogsPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # `CloudLoggingOption` contains additional settings for Cloud Logging logs # generated by Batch job. # @!attribute [rw] use_generic_task_monitored_resource # @return [::Boolean] # Optional. Set this field to `true` to change the [monitored resource # type](https://cloud.google.com/monitoring/api/resources) for # Cloud Logging logs generated by this Batch job from # the # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) # type to the formerly used # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) # type. class CloudLoggingOption include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The destination (if any) for logs. module Destination # (Default) Logs are not preserved. DESTINATION_UNSPECIFIED = 0 # Logs are streamed to Cloud Logging. Optionally, you can configure # additional settings in the `cloudLoggingOption` field. CLOUD_LOGGING = 1 # Logs are saved to the file path specified in the `logsPath` field. PATH = 2 end end |
#logs_path ⇒ ::String
Returns 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/
.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'proto_docs/google/cloud/batch/v1/job.rb', line 109 class LogsPolicy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # `CloudLoggingOption` contains additional settings for Cloud Logging logs # generated by Batch job. # @!attribute [rw] use_generic_task_monitored_resource # @return [::Boolean] # Optional. Set this field to `true` to change the [monitored resource # type](https://cloud.google.com/monitoring/api/resources) for # Cloud Logging logs generated by this Batch job from # the # [`batch.googleapis.com/Job`](https://cloud.google.com/monitoring/api/resources#tag_batch.googleapis.com/Job) # type to the formerly used # [`generic_task`](https://cloud.google.com/monitoring/api/resources#tag_generic_task) # type. class CloudLoggingOption include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The destination (if any) for logs. module Destination # (Default) Logs are not preserved. DESTINATION_UNSPECIFIED = 0 # Logs are streamed to Cloud Logging. Optionally, you can configure # additional settings in the `cloudLoggingOption` field. CLOUD_LOGGING = 1 # Logs are saved to the file path specified in the `logsPath` field. PATH = 2 end end |