25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/hq/logger/text-logger.rb', line 25
def output_real content, stuff
if content.is_a? String
text_line content, stuff
return
end
case content["type"]
when "log"
text_line content["text"], stuff
if content["content"]
content["content"].each do
|item|
output item, stuff, " "
end
end
when "exception"
text_line content["text"], stuff
text_line content["message"], stuff, " "
content["backtrace"].each do
|frame|
output frame, stuff, " "
end
when "diff"
text_line content["text"], stuff
content["content"].each do
|line|
output line["text"], stuff, " "
end
when "command"
text_line content["text"], stuff
if content["output"]
content["output"].each do
|line|
output line, stuff, " "
end
end
when "command-output"
text_line content["text"], stuff, " "
else
pp content
raise "Error"
end
end
|