class SemanticLogger::Appender::Bugsnag
def initialize(level: :error, **args, &block)
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: :error
Override the log level for this appender.
level: [:trace | :debug | :info | :warn | :error | :fatal]
Parameters
Create Bugsnag Error / Exception Appender
def initialize(level: :error, **args, &block) raise "Bugsnag only supports :info, :warn, or :error log levels" unless %i[info warn error fatal].include?(level) # Replace the Bugsnag logger so that we can identify its log messages and not forward them to Bugsnag ::Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] } super end