Module: HackBoxen::Logging

Includes:
Paths, Log4r
Defined in:
lib/hackboxen/utils/logging.rb

Instance Method Summary collapse

Methods included from Paths

#default_paths, #path_to, #paths

Instance Method Details

#logObject



15
16
17
# File 'lib/hackboxen/utils/logging.rb', line 15

def log
  @log
end

#logs_to(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/hackboxen/utils/logging.rb', line 8

def logs_to *args
  @log = Logger.new('hackbox_logger')
  @log.outputters = args.map do |location|
    l = create_log(location)
    l.formatter = default_format
    l
  end
  def log
    @log
  end
end