Revision 87d1bf2e snf-image-helper/common.sh
b/snf-image-helper/common.sh | ||
---|---|---|
63 | 63 |
local timestamp=$(date +%s.%N) |
64 | 64 |
local name="${PROGNAME}" |
65 | 65 |
|
66 |
report="{\"id\":\"$id\"," |
|
67 |
report+="\"type\":\"$type\"," \ |
|
68 |
report+="\"timestamp\":$(date +%s.%N)," \ |
|
66 |
report+="\"type\":\"$type\"," |
|
67 |
report+="\"timestamp\":$(date +%s.%N)," |
|
69 | 68 |
report+="\"name\":\"$name\"}" |
70 | 69 |
|
71 | 70 |
echo "$report" > "$MONITOR" |
... | ... | |
93 | 92 |
local name=${PROGNAME} |
94 | 93 |
local warnings=$(json_list WARNINGS[@]) |
95 | 94 |
|
96 |
report="{\"id\":\"$id\"," |
|
97 |
report+="\"type\":\"$type\"," \ |
|
98 |
report+="\"timestamp\":$(date +%s)," \ |
|
99 |
report+="\"name\":\"$name\"," \ |
|
95 |
report="\"type\":\"$type\"," |
|
96 |
report+="\"timestamp\":$(date +%s)," |
|
97 |
report+="\"name\":\"$name\"," |
|
100 | 98 |
report+="\"warnings\":\"$warnings\"}" |
101 | 99 |
|
102 | 100 |
echo "$report" > "$MONITOR" |
... | ... | |
110 | 108 |
local warnings=$(json_list WARNINGS[@]) |
111 | 109 |
local stderr="$(cat "$STDERR_FILE" | sed 's/"/\\"/g')" |
112 | 110 |
|
113 |
report="{\"id\":\"$id\"," |
|
114 |
report+="\"type\":\"$type\"," \ |
|
115 |
report+="\"timestamp\":$(date +%s)," \ |
|
116 |
report+="\"location\":\"$location\"," \ |
|
117 |
report+="\"errors\":$errors," \ |
|
118 |
report+="\"warnings\":$warnings," \ |
|
111 |
report="\"type\":\"$type\"," |
|
112 |
report+="\"timestamp\":$(date +%s)," |
|
113 |
report+="\"location\":\"$location\"," |
|
114 |
report+="\"errors\":$errors," |
|
115 |
report+="\"warnings\":$warnings," |
|
119 | 116 |
report+="\"stderr\":\"$stderr\"}" |
120 | 117 |
|
121 | 118 |
echo "$report" > "$MONITOR" |
Also available in: Unified diff