Method: SemanticLogger::Appender::Sentry#initialize
- Defined in:
- lib/semantic_logger/appender/sentry.rb
#initialize(level: :error, **args, &block) ⇒ Sentry
Create Appender
Parameters
level: [:trace | :debug | :info | :warn | :error | :fatal]
Override the log level for this appender.
Default: :error
formatter: [Object|Proc|Symbol|Hash]
An instance of a class that implements #call, or a Proc to be used to format
the output from this appender
Default: Use the built-in formatter (See: #call)
filter: [Regexp|Proc]
RegExp: Only include log where the class name matches the supplied.
regular expression. All other will be ignored.
Proc: Only include log where the supplied Proc returns true
The Proc must return true or false.
host: [String]
Name of this host to appear in log .
Default: SemanticLogger.host
application: [String]
Name of this application to appear in log .
Default: SemanticLogger.application
41 42 43 44 45 |
# File 'lib/semantic_logger/appender/sentry.rb', line 41 def initialize(level: :error, **args, &block) # Replace the Sentry Raven logger so that we can identify its log messages and not forward them to Sentry Raven.configure { |config| config.logger = SemanticLogger[Raven] } super end |