Class: ReeLogger::Appender

Inherits:
Object
  • Object
show all
Defined in:
lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/appender.rb

Direct Known Subclasses

FileAppender, RollbarAppender, StdoutAppender

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level, formatter) ⇒ Appender

Returns a new instance of Appender.



6
7
8
9
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/appender.rb', line 6

def initialize(level, formatter)
  @level = level
  @formatter = formatter
end

Instance Attribute Details

#formatterObject (readonly)

Returns the value of attribute formatter.



4
5
6
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/appender.rb', line 4

def formatter
  @formatter
end

#levelObject (readonly)

Returns the value of attribute level.



4
5
6
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/appender.rb', line 4

def level
  @level
end

Instance Method Details

#append(log_event, progname = nil) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/ree_lib/packages/ree_logger/package/ree_logger/appenders/appender.rb', line 11

def append(log_event, progname = nil)
  raise NotImplementedError, "should be implemented in derived class"
end