Skip to content

Commit

Permalink
log/console_adapter: support console gem v1.25
Browse files Browse the repository at this point in the history
`Console::Terminal::Logger` class path has changed in `console`
gem v1.25:

socketry/console@v1.24.0...v1.25.0#diff-6e7355da8b6a8f794e74e462aebbe4b23f7752dab2a29967d17707eabb71ce12

For the v1.25, there is another issue about a warning(fluent#4488):

    Fiber#storage has borked keys and is being monkey-patched.

Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed May 13, 2024
1 parent 236d87d commit 9e9c5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/log/console_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e9c5f2

Please sign in to comment.