Module: IRT::Commands::Log

Included in:
IRB::ExtendCommandBundle
Defined in:
lib/irt/commands/log.rb

Instance Method Summary collapse

Instance Method Details

#full_logObject Also known as: ll



12
13
14
15
16
# File 'lib/irt/commands/log.rb', line 12

def full_log
  ensure_session
  IRT.log.print
  IRT.log.print_status
end

#log(limit = nil) ⇒ Object Also known as: l



5
6
7
8
9
# File 'lib/irt/commands/log.rb', line 5

def log(limit=nil)
  ensure_session
  IRT.log.print limit || IRT.log.tail_size
  IRT.log.print_status
end


35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/irt/commands/log.rb', line 35

def print_all_lines
  ensure_session
  lines = []
  IRT.log.reject{|h| h.class == IRT::Log::FileHunk }.each do |h|
    ls = h.lines_str
    lines << ls unless ls.empty?
  end
  unless lines.empty?
    puts
    puts lines.join("\n\n")
    puts
  end
end


25
26
27
28
29
30
31
32
# File 'lib/irt/commands/log.rb', line 25

def print_lines
  ensure_session
  lines_str = IRT.log.last.lines_str
  return if lines_str.empty?
  puts
  puts lines_str
  puts
end

#statusObject Also known as: ss



19
20
21
22
# File 'lib/irt/commands/log.rb', line 19

def status
  ensure_session
  IRT.log.print_status
end