Class: ExceptionNotifier::FluentLoggerNotifier
- Inherits:
-
Object
- Object
- ExceptionNotifier::FluentLoggerNotifier
- Defined in:
- lib/exception_notifier/fluent_logger_notifier.rb,
lib/exception_notifier/fluent_logger_notifier/version.rb
Defined Under Namespace
Classes: Argument, ConfigurationError, SetupError
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
- #call(exception, options = {}) ⇒ Object
-
#initialize(options) ⇒ FluentLoggerNotifier
constructor
A new instance of FluentLoggerNotifier.
Constructor Details
#initialize(options) ⇒ FluentLoggerNotifier
Returns a new instance of FluentLoggerNotifier.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/exception_notifier/fluent_logger_notifier.rb', line 8 def initialize() @template = .delete(:template) raise ConfigurationError, "`template` key must be set" unless @template logger_settings = .delete(:logger_settings) || {} if .delete(:test_logger) @logger = Fluent::Logger::TestLogger.new else tag_prefix = .delete(:tag_prefix) @logger = Fluent::Logger::FluentLogger.new(tag_prefix, logger_settings) end end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/exception_notifier/fluent_logger_notifier.rb', line 5 def logger @logger end |
#template ⇒ Object
Returns the value of attribute template.
5 6 7 |
# File 'lib/exception_notifier/fluent_logger_notifier.rb', line 5 def template @template end |