Sha256: 1142de09f68792a8acd90aec1cb8d81f96a68a079c4fb3757b728489c1e74499

Contents?: true

Size: 770 Bytes

Versions: 24

Compression:

Stored size: 770 Bytes

Contents

require_relative './htmllog.rb'
require_relative './jsonlog.rb'
require_relative './yamllog.rb'

class Logger
	@@timers=Hash.new
	@@html_log=HtmlLog.new
  @@json_log=JsonLog.new
  @@yaml_log=YamlLog.new
	def self.start_task task
		@@timers[task]=Timer.new
		Console.announce_task_start task
		@@html_log.start_task task
  	end

  	def self.end_task task
  		elapsed=@@timers[task].elapsed
  		@@html_log.end_task task
  	end

  	def self.finalize
  		@@html_log.finalize
      @@json_log.finalize
      @@yaml_log.finalize
  	end

  	def self.start_command command
      Console.start_command command
      //
      @@html_log.start_command command
  	end

  	def self.end_command command
      Console.end_command command
      @@html_log.end_command command
  	end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dev_tasks-0.0.167 lib/logger.rb
dev_tasks-1.0.0 lib/logger.rb
dev_tasks-0.0.166 lib/logger.rb
dev_tasks-0.0.164 lib/logger.rb