From f9a934a01fb65491addc4fed2220912fc7dcf0cd Mon Sep 17 00:00:00 2001 From: Nick Lozon Date: Wed, 22 Nov 2023 13:27:47 -0500 Subject: [PATCH] configuration `logging` accessor --- lib/kamal/configuration.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index a3b074d5..1e5ad1f7 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -6,7 +6,7 @@ require "erb" require "net/ssh/proxy/jump" class Kamal::Configuration - delegate :service, :image, :servers, :env, :labels, :registry, :stop_wait_time, :hooks_path, to: :raw_config, allow_nil: true + delegate :service, :image, :servers, :env, :labels, :registry, :stop_wait_time, :hooks_path, :logging, to: :raw_config, allow_nil: true delegate :argumentize, :optionize, to: Kamal::Utils attr_reader :destination, :raw_config @@ -141,9 +141,9 @@ class Kamal::Configuration end def logging_args - if raw_config.logging.present? - optionize({ "log-driver" => raw_config.logging["driver"] }.compact) + - argumentize("--log-opt", raw_config.logging["options"]) + if logging.present? + optionize({ "log-driver" => logging["driver"] }.compact) + + argumentize("--log-opt", logging["options"]) else argumentize("--log-opt", { "max-size" => "10m" }) end