Class: Steno::Sink::Base
Overview
Sinks represent the final destination for log records. They abstract storage mediums (like files) and transport layers (like sockets).
Instance Attribute Summary collapse
-
#codec ⇒ Object
Returns the value of attribute codec.
Instance Method Summary collapse
-
#add_record(record) ⇒ nil
Adds a record to be flushed at a later time.
-
#flush ⇒ nil
Flushes any buffered records.
-
#initialize(codec = nil) ⇒ Base
constructor
raw, string-based representation that will be written to the underlying sink.
Constructor Details
#initialize(codec = nil) ⇒ Base
raw, string-based representation that will be written to the underlying sink.
19 20 21 |
# File 'lib/steno/sink/base.rb', line 19 def initialize(codec = nil) @codec = codec end |
Instance Attribute Details
#codec ⇒ Object
Returns the value of attribute codec.
14 15 16 |
# File 'lib/steno/sink/base.rb', line 14 def codec @codec end |
Instance Method Details
#add_record(record) ⇒ nil
Adds a record to be flushed at a later time.
28 29 30 |
# File 'lib/steno/sink/base.rb', line 28 def add_record(record) raise NotImplementedError end |
#flush ⇒ nil
Flushes any buffered records.
35 36 37 |
# File 'lib/steno/sink/base.rb', line 35 def flush raise NotImplementedError end |