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.
17 18 19 |
# File 'lib/steno/sink/base.rb', line 17 def initialize(codec = nil) @codec = codec end |
Instance Attribute Details
#codec ⇒ Object
Returns the value of attribute codec.
12 13 14 |
# File 'lib/steno/sink/base.rb', line 12 def codec @codec end |
Instance Method Details
#add_record(record) ⇒ nil
Adds a record to be flushed at a later time.
26 27 28 |
# File 'lib/steno/sink/base.rb', line 26 def add_record(record) raise NotImplementedError end |
#flush ⇒ nil
Flushes any buffered records.
33 34 35 |
# File 'lib/steno/sink/base.rb', line 33 def flush raise NotImplementedError end |