piotrmurach/tty-logger

View on GitHub
examples/filter.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative "../lib/tty/logger"

logger = TTY::Logger.new do |config|
  config.filters.data = [/^foo.*?\.baz/]
end

logger.info("Filtering data", {"foo" => {"bar" => {"baz" => "val"}}, "baz" => ["bar", "val"]})