Class: AWSCDK::ECS::FluentdLogDriverProps
- Inherits:
-
BaseLogDriverProps
- Object
- BaseLogDriverProps
- AWSCDK::ECS::FluentdLogDriverProps
- Defined in:
- ecs/fluentd_log_driver_props.rb
Overview
Specifies the fluentd log driver configuration options.
Instance Attribute Summary collapse
-
#address ⇒ String?
readonly
By default, the logging driver connects to localhost:24224.
-
#async ⇒ Boolean?
readonly
Docker connects to Fluentd in the background.
-
#async_connect ⇒ Boolean?
readonly
deprecated
Deprecated.
use
asyncinstead -
#buffer_limit ⇒ Numeric?
readonly
The amount of data to buffer before flushing to disk.
-
#env ⇒ Array<String>?
readonly
The env option takes an array of keys.
-
#env_regex ⇒ String?
readonly
The env-regex option is similar to and compatible with env.
-
#labels ⇒ Array<String>?
readonly
The labels option takes an array of keys.
-
#max_retries ⇒ Numeric?
readonly
The maximum number of retries.
-
#retry_wait ⇒ AWSCDK::Duration?
readonly
How long to wait between retries.
-
#sub_second_precision ⇒ Boolean?
readonly
Generates event logs in nanosecond resolution.
-
#tag ⇒ String?
readonly
By default, Docker uses the first 12 characters of the container ID to tag log messages.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address: nil, async: nil, async_connect: nil, buffer_limit: nil, max_retries: nil, retry_wait: nil, sub_second_precision: nil) ⇒ FluentdLogDriverProps
constructor
A new instance of FluentdLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address: nil, async: nil, async_connect: nil, buffer_limit: nil, max_retries: nil, retry_wait: nil, sub_second_precision: nil) ⇒ FluentdLogDriverProps
Returns a new instance of FluentdLogDriverProps.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'ecs/fluentd_log_driver_props.rb', line 20 def initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address: nil, async: nil, async_connect: nil, buffer_limit: nil, max_retries: nil, retry_wait: nil, sub_second_precision: nil) @env = env Jsii::Type.check_type(@env, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "env") unless @env.nil? @env_regex = env_regex Jsii::Type.check_type(@env_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "envRegex") unless @env_regex.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "labels") unless @labels.nil? @tag = tag Jsii::Type.check_type(@tag, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tag") unless @tag.nil? @address = address Jsii::Type.check_type(@address, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "address") unless @address.nil? @async = async Jsii::Type.check_type(@async, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "async") unless @async.nil? @async_connect = async_connect Jsii::Type.check_type(@async_connect, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "asyncConnect") unless @async_connect.nil? @buffer_limit = buffer_limit Jsii::Type.check_type(@buffer_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "bufferLimit") unless @buffer_limit.nil? @max_retries = max_retries Jsii::Type.check_type(@max_retries, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRetries") unless @max_retries.nil? @retry_wait = retry_wait Jsii::Type.check_type(@retry_wait, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "retryWait") unless @retry_wait.nil? @sub_second_precision = sub_second_precision Jsii::Type.check_type(@sub_second_precision, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "subSecondPrecision") unless @sub_second_precision.nil? end |
Instance Attribute Details
#address ⇒ String? (readonly)
Default: - address not set.
By default, the logging driver connects to localhost:24224.
Supply the address option to connect to a different address. tcp(default) and unix sockets are supported.
88 89 90 |
# File 'ecs/fluentd_log_driver_props.rb', line 88 def address @address end |
#async ⇒ Boolean? (readonly)
Default: - false
Docker connects to Fluentd in the background.
Messages are buffered until the connection is established.
96 97 98 |
# File 'ecs/fluentd_log_driver_props.rb', line 96 def async @async end |
#async_connect ⇒ Boolean? (readonly)
use async instead
Default: - false
Docker connects to Fluentd in the background.
Messages are buffered until the connection is established.
105 106 107 |
# File 'ecs/fluentd_log_driver_props.rb', line 105 def async_connect @async_connect end |
#buffer_limit ⇒ Numeric? (readonly)
Default: - The amount of RAM available to the container.
The amount of data to buffer before flushing to disk.
110 111 112 |
# File 'ecs/fluentd_log_driver_props.rb', line 110 def buffer_limit @buffer_limit end |
#env ⇒ Array<String>? (readonly)
Default: - No env
The env option takes an array of keys.
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
53 54 55 |
# File 'ecs/fluentd_log_driver_props.rb', line 53 def env @env end |
#env_regex ⇒ String? (readonly)
Default: - No envRegex
The env-regex option is similar to and compatible with env.
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
62 63 64 |
# File 'ecs/fluentd_log_driver_props.rb', line 62 def env_regex @env_regex end |
#labels ⇒ Array<String>? (readonly)
Default: - No labels
The labels option takes an array of keys.
If there is collision between label and env keys, the value of the env takes precedence. Adds additional fields to the extra attributes of a logging message.
71 72 73 |
# File 'ecs/fluentd_log_driver_props.rb', line 71 def labels @labels end |
#max_retries ⇒ Numeric? (readonly)
Default: - 4294967295 (2**32 - 1).
The maximum number of retries.
115 116 117 |
# File 'ecs/fluentd_log_driver_props.rb', line 115 def max_retries @max_retries end |
#retry_wait ⇒ AWSCDK::Duration? (readonly)
Default: - 1 second
How long to wait between retries.
120 121 122 |
# File 'ecs/fluentd_log_driver_props.rb', line 120 def retry_wait @retry_wait end |
#sub_second_precision ⇒ Boolean? (readonly)
Default: - false
Generates event logs in nanosecond resolution.
125 126 127 |
# File 'ecs/fluentd_log_driver_props.rb', line 125 def sub_second_precision @sub_second_precision end |
#tag ⇒ String? (readonly)
Default: - The first 12 characters of the container ID
By default, Docker uses the first 12 characters of the container ID to tag log messages.
Refer to the log tag option documentation for customizing the log tag format.
79 80 81 |
# File 'ecs/fluentd_log_driver_props.rb', line 79 def tag @tag end |
Class Method Details
.jsii_properties ⇒ Object
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'ecs/fluentd_log_driver_props.rb', line 127 def self.jsii_properties { :env => "env", :env_regex => "envRegex", :labels => "labels", :tag => "tag", :address => "address", :async => "async", :async_connect => "asyncConnect", :buffer_limit => "bufferLimit", :max_retries => "maxRetries", :retry_wait => "retryWait", :sub_second_precision => "subSecondPrecision", } end |
Instance Method Details
#to_jsii ⇒ Object
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'ecs/fluentd_log_driver_props.rb', line 143 def to_jsii result = {} result.merge!(super) result.merge!({ "env" => @env, "envRegex" => @env_regex, "labels" => @labels, "tag" => @tag, "address" => @address, "async" => @async, "asyncConnect" => @async_connect, "bufferLimit" => @buffer_limit, "maxRetries" => @max_retries, "retryWait" => @retry_wait, "subSecondPrecision" => @sub_second_precision, }) result.compact end |