Class: Logsly::Outputs::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/logsly/outputs.rb

Overview

BASE

Direct Known Subclasses

File, Stdout, Syslog

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#buildObject (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

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/logsly/outputs.rb', line 27

def data(*args)
  raise NotImplementedError
end

#to_appender(data) ⇒ Object

Raises:

  • (NotImplementedError)


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