Class: Woodchuck::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/woodchuck/output.rb

Direct Known Subclasses

Redis, STDOUT, ZeroMQ

Defined Under Namespace

Classes: Redis, STDOUT, ZeroMQ

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_level) ⇒ Output

Returns a new instance of Output.



6
7
8
9
10
# File 'lib/woodchuck/output.rb', line 6

def initialize(log_level)
  @host = Socket.gethostname
  @logger = Woodchuck::Logger.new(::STDOUT)
@logger.level = log_level
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/woodchuck/output.rb', line 4

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/woodchuck/output.rb', line 4

def logger
  @logger
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/woodchuck/output.rb', line 4

def type
  @type
end

Instance Method Details

#handle(event) ⇒ Object



12
13
14
# File 'lib/woodchuck/output.rb', line 12

def handle(event)
  true
end