Class: Logger

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

Constant Summary collapse

@@timers =
Hash.new
@@html_log =
HtmlLog.new
@@json_log =
JsonLog.new
@@yaml_log =
YamlLog.new

Class Method Summary collapse

Class Method Details

.end_command(command) ⇒ Object



33
34
35
36
# File 'lib/logger.rb', line 33

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

.end_task(task) ⇒ Object



16
17
18
19
# File 'lib/logger.rb', line 16

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

.finalizeObject



21
22
23
24
25
# File 'lib/logger.rb', line 21

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

.start_command(command) ⇒ Object



27
28
29
30
31
# File 'lib/logger.rb', line 27

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

.start_task(task) ⇒ Object



10
11
12
13
14
# File 'lib/logger.rb', line 10

def self.start_task task
    @@timers[task]=Timer.new
    Console.announce_task_start task
    @@html_log.start_task task
end