Sha256: 1bf8ed689741c966c648ea15a06f74121aac8a2583b592020b7510ee5ebd3fd9

Contents?: true

Size: 425 Bytes

Versions: 12

Compression:

Stored size: 425 Bytes

Contents

module Pork
  class Log
    attr_accessor :log, :researcher, :project, :output
  
    def initialize(output, options = {})
      @log = Logger.new(output)
      @log.level = "info"
      @researcher = options[:researcher] if options[:researcher]
      @project = options[:project] if options[:project]
    end
  
    def write(message)
      @log.info("#{@project}, #{@researcher}, #{Time.now}: " + message)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pork_sandwich-0.4.8 lib/pork_sandwich/log.rb
pork_sandwich-0.4.7 lib/pork_sandwich/log.rb
pork_sandwich-0.4.6 lib/pork_sandwich/log.rb
pork_sandwich-0.4.5 lib/pork_sandwich/log.rb
pork_sandwich-0.4.4 lib/pork_sandwich/log.rb
pork_sandwich-0.4.3 lib/pork_sandwich/log.rb
pork_sandwich-0.4.2 lib/pork_sandwich/log.rb
pork_sandwich-0.4.1 lib/pork_sandwich/log.rb
pork_sandwich-0.4.0 lib/pork_sandwich/log.rb
pork_sandwich-0.3.0 lib/pork_sandwich/log.rb
pork_sandwich-0.2.0 lib/pork_sandwich/log.rb
pork_sandwich-0.1.0 lib/pork/log.rb