Class: AWSCDK::ECS::GelfLogDriverProps
- Inherits:
-
BaseLogDriverProps
- Object
- BaseLogDriverProps
- AWSCDK::ECS::GelfLogDriverProps
- Defined in:
- ecs/gelf_log_driver_props.rb
Overview
Specifies the journald log driver configuration options.
Instance Attribute Summary collapse
-
#address ⇒ String
readonly
The address of the GELF server.
-
#compression_level ⇒ Numeric?
readonly
UDP Only The level of compression when gzip or zlib is the gelf-compression-type.
-
#compression_type ⇒ AWSCDK::ECS::GelfCompressionType?
readonly
UDP Only The type of compression the GELF driver uses to compress each log message.
-
#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.
-
#tag ⇒ String?
readonly
By default, Docker uses the first 12 characters of the container ID to tag log messages.
-
#tcp_max_reconnect ⇒ Numeric?
readonly
TCP Only The maximum number of reconnection attempts when the connection drop.
-
#tcp_reconnect_delay ⇒ AWSCDK::Duration?
readonly
TCP Only The number of seconds to wait between reconnection attempts.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address:, compression_level: nil, compression_type: nil, tcp_max_reconnect: nil, tcp_reconnect_delay: nil) ⇒ GelfLogDriverProps
constructor
A new instance of GelfLogDriverProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address:, compression_level: nil, compression_type: nil, tcp_max_reconnect: nil, tcp_reconnect_delay: nil) ⇒ GelfLogDriverProps
Returns a new instance of GelfLogDriverProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'ecs/gelf_log_driver_props.rb', line 18 def initialize(env: nil, env_regex: nil, labels: nil, tag: nil, address:, compression_level: nil, compression_type: nil, tcp_max_reconnect: nil, tcp_reconnect_delay: 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") @compression_level = compression_level Jsii::Type.check_type(@compression_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "compressionLevel") unless @compression_level.nil? @compression_type = compression_type Jsii::Type.check_type(@compression_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkdlbGZDb21wcmVzc2lvblR5cGUifQ==")), "compressionType") unless @compression_type.nil? @tcp_max_reconnect = tcp_max_reconnect Jsii::Type.check_type(@tcp_max_reconnect, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "tcpMaxReconnect") unless @tcp_max_reconnect.nil? @tcp_reconnect_delay = tcp_reconnect_delay Jsii::Type.check_type(@tcp_reconnect_delay, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "tcpReconnectDelay") unless @tcp_reconnect_delay.nil? end |
Instance Attribute Details
#address ⇒ String (readonly)
The address of the GELF server.
tcp and udp are the only supported URI specifier and you must specify the port.
80 81 82 |
# File 'ecs/gelf_log_driver_props.rb', line 80 def address @address end |
#compression_level ⇒ Numeric? (readonly)
Default: - 1
UDP Only The level of compression when gzip or zlib is the gelf-compression-type.
An integer in the range of -1 to 9 (BestCompression). Higher levels provide more compression at lower speed. Either -1 or 0 disables compression.
88 89 90 |
# File 'ecs/gelf_log_driver_props.rb', line 88 def compression_level @compression_level end |
#compression_type ⇒ AWSCDK::ECS::GelfCompressionType? (readonly)
Default: - gzip
UDP Only The type of compression the GELF driver uses to compress each log message.
Allowed values are gzip, zlib and none.
95 96 97 |
# File 'ecs/gelf_log_driver_props.rb', line 95 def compression_type @compression_type 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.
47 48 49 |
# File 'ecs/gelf_log_driver_props.rb', line 47 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.
56 57 58 |
# File 'ecs/gelf_log_driver_props.rb', line 56 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.
65 66 67 |
# File 'ecs/gelf_log_driver_props.rb', line 65 def labels @labels 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.
73 74 75 |
# File 'ecs/gelf_log_driver_props.rb', line 73 def tag @tag end |
#tcp_max_reconnect ⇒ Numeric? (readonly)
Default: - 3
TCP Only The maximum number of reconnection attempts when the connection drop.
A positive integer.
102 103 104 |
# File 'ecs/gelf_log_driver_props.rb', line 102 def tcp_max_reconnect @tcp_max_reconnect end |
#tcp_reconnect_delay ⇒ AWSCDK::Duration? (readonly)
Default: - 1
TCP Only The number of seconds to wait between reconnection attempts.
A positive integer.
109 110 111 |
# File 'ecs/gelf_log_driver_props.rb', line 109 def tcp_reconnect_delay @tcp_reconnect_delay end |
Class Method Details
.jsii_properties ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'ecs/gelf_log_driver_props.rb', line 111 def self.jsii_properties { :env => "env", :env_regex => "envRegex", :labels => "labels", :tag => "tag", :address => "address", :compression_level => "compressionLevel", :compression_type => "compressionType", :tcp_max_reconnect => "tcpMaxReconnect", :tcp_reconnect_delay => "tcpReconnectDelay", } end |
Instance Method Details
#to_jsii ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'ecs/gelf_log_driver_props.rb', line 125 def to_jsii result = {} result.merge!(super) result.merge!({ "env" => @env, "envRegex" => @env_regex, "labels" => @labels, "tag" => @tag, "address" => @address, "compressionLevel" => @compression_level, "compressionType" => @compression_type, "tcpMaxReconnect" => @tcp_max_reconnect, "tcpReconnectDelay" => @tcp_reconnect_delay, }) result.compact end |