Class: Kamal::Configuration::Output
- Inherits:
-
Object
- Object
- Kamal::Configuration::Output
- Includes:
- Validation
- Defined in:
- lib/kamal/configuration/output.rb
Constant Summary collapse
- LOGGER_TYPES =
{ "otel" => "Kamal::Output::OtelLogger", "file" => "Kamal::Output::FileLogger" }
Instance Attribute Summary collapse
-
#loggers ⇒ Object
readonly
Returns the value of attribute loggers.
-
#output_config ⇒ Object
readonly
Returns the value of attribute output_config.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(config:) ⇒ Output
constructor
A new instance of Output.
- #to_h ⇒ Object
Methods included from Validation
Constructor Details
#initialize(config:) ⇒ Output
Returns a new instance of Output.
11 12 13 14 15 16 |
# File 'lib/kamal/configuration/output.rb', line 11 def initialize(config:) @config = config @output_config = config.raw_config.output || {} validate! @output_config unless @output_config.empty? @loggers = build_loggers end |
Instance Attribute Details
#loggers ⇒ Object (readonly)
Returns the value of attribute loggers.
9 10 11 |
# File 'lib/kamal/configuration/output.rb', line 9 def loggers @loggers end |
#output_config ⇒ Object (readonly)
Returns the value of attribute output_config.
9 10 11 |
# File 'lib/kamal/configuration/output.rb', line 9 def output_config @output_config end |
Instance Method Details
#enabled? ⇒ Boolean
18 19 20 |
# File 'lib/kamal/configuration/output.rb', line 18 def enabled? output_config.present? end |
#to_h ⇒ Object
22 23 24 |
# File 'lib/kamal/configuration/output.rb', line 22 def to_h output_config end |