Class: RailsErrorLogger::Logger
- Inherits:
-
ActiveSupport::Logger
- Object
- ActiveSupport::Logger
- RailsErrorLogger::Logger
- Defined in:
- lib/rails_error_logger/logger.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(*args) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_error_logger/logger.rb', line 6 def initialize(*args) @progname = nil @level = ERROR @default_formatter = proc do |severity, datetime, progname, msg| { exception: RuntimeError.new(msg), options: { severity: SEV_LABEL.index(severity) } } end @formatter = nil @logdev = "RailsErrorLogger::#{args.first.to_s.camelize}".constantize.new end |