module Output::Devices::Builder

Public Class Methods

included(base) click to toggle source
# File lib/output/devices.rb, line 32
def self.included(base)
  base.extend ClassMethods
end

Public Instance Methods

build(name, options) click to toggle source
# File lib/output/devices.rb, line 24
def build(name, options)
  pattern = options[:pattern]
  layout = self.layout(pattern)
  options = { :layout => layout }.merge(options)

  Logging.appenders.send self.class.device_id, name, options
end
layout(pattern = Output::Devices::DEFAULT_PATTERN) click to toggle source
# File lib/output/devices.rb, line 20
def layout(pattern = Output::Devices::DEFAULT_PATTERN)
  Logging.layouts.pattern(:pattern => pattern)
end