From 9e9c5f2892b7117a94884ea13322c1416d681bf3 Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Mon, 13 May 2024 15:12:49 +0900 Subject: [PATCH] log/console_adapter: support console gem v1.25 `Console::Terminal::Logger` class path has changed in `console` gem v1.25: https://github.com/socketry/console/compare/v1.24.0...v1.25.0#diff-6e7355da8b6a8f794e74e462aebbe4b23f7752dab2a29967d17707eabb71ce12 For the v1.25, there is another issue about a warning(#4488): Fiber#storage has borked keys and is being monkey-patched. Signed-off-by: Daijiro Fukuda --- lib/fluent/log/console_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fluent/log/console_adapter.rb b/lib/fluent/log/console_adapter.rb index 9c8ecf482e..2d27df4bf5 100644 --- a/lib/fluent/log/console_adapter.rb +++ b/lib/fluent/log/console_adapter.rb @@ -14,14 +14,14 @@ # limitations under the License. # -require 'console/terminal/logger' +require 'console/output/terminal' module Fluent class Log # Async gem which is used by http_server helper switched logger mechanism to # Console gem which isn't complatible with Ruby's standard Logger (since # v1.17). This class adapts it to Fluentd's logger mechanism. - class ConsoleAdapter < Console::Terminal::Logger + class ConsoleAdapter < Console::Output::Terminal def self.wrap(logger) _, level = Console::Logger::LEVELS.find { |key, value| if logger.level <= 0