class SemanticLogger::Appender::Wrapper

def initialize(logger:, **args, &block)

Install the `rails_semantic_logger` gem to replace the Rails logger with Semantic Logger.

logger.info('Hello World', some: :payload)
logger = SemanticLogger['test']

SemanticLogger.add_appender(logger: ruby_logger)
ruby_logger = Logger.new($stdout)

require 'semantic_logger'
require 'logger'
Ruby Logger

The Proc must return true or false.
Proc: Only include log messages where the supplied Proc returns true
regular expression. All other messages will be ignored.
RegExp: Only include log messages where the class name matches the supplied.
filter: [Regexp|Proc]

Default: Use the built-in formatter (See: #call)
the output from this appender
An instance of a class that implements #call, or a Proc to be used to format
formatter: [Object|Proc]

Default: SemanticLogger.default_level
Override the log level for this appender.
level: [:trace | :debug | :info | :warn | :error | :fatal]

Instance of an existing logger conforming to the Ruby Logger methods.
logger: [Object]
Parameters

Forward all logging calls to the supplied logging instance.
def initialize(logger:, **args, &block)
  @logger = logger
  # Check if the custom appender responds to all the log levels. For example Ruby ::Logger
  does_not_implement = LEVELS[1..-1].find { |i| !@logger.respond_to?(i) }
  if does_not_implement
    raise(ArgumentError,
          "Supplied logger does not implement:#{does_not_implement}. It must implement all of #{LEVELS[1..-1].inspect}")
  end
  super(**args, &block)
end