Class: Logsly::Outputs::Base
- Inherits:
-
Object
- Object
- Logsly::Outputs::Base
- Defined in:
- lib/logsly/outputs.rb
Overview
BASE
Instance Attribute Summary collapse
-
#build ⇒ Object
readonly
Returns the value of attribute build.
Instance Method Summary collapse
- #data(*args) ⇒ Object
-
#initialize(&build) ⇒ Base
constructor
A new instance of Base.
- #to_appender(data) ⇒ Object
- #to_layout(data) ⇒ Object
Constructor Details
#initialize(&build) ⇒ Base
Returns a new instance of Base.
23 24 25 |
# File 'lib/logsly/outputs.rb', line 23 def initialize(&build) @build = build || Proc.new{} end |
Instance Attribute Details
#build ⇒ Object (readonly)
Returns the value of attribute build.
21 22 23 |
# File 'lib/logsly/outputs.rb', line 21 def build @build end |
Instance Method Details
#data(*args) ⇒ Object
27 28 29 |
# File 'lib/logsly/outputs.rb', line 27 def data(*args) raise NotImplementedError end |
#to_appender(data) ⇒ Object
35 36 37 |
# File 'lib/logsly/outputs.rb', line 35 def to_appender(data) raise NotImplementedError end |
#to_layout(data) ⇒ Object
31 32 33 |
# File 'lib/logsly/outputs.rb', line 31 def to_layout(data) Logsly::Logging182.layouts.pattern(data.to_pattern_opts) end |