| 1199 | } |
| 1200 | |
| 1201 | function logMsg(msg, level, outputMsg) { |
| 1202 | if (outputMsg.hasChildNodes()) { |
| 1203 | outputMsg.appendChild(document.createElement("br")) |
| 1204 | } |
| 1205 | if (level === "error") { |
| 1206 | outputMsg.innerHTML += '<span style="color: red">Error: ' + msg + "</span>" |
| 1207 | } else if (level === "warn") { |
| 1208 | outputMsg.innerHTML += '<span style="color: orange">Warning: ' + msg + "</span>" |
| 1209 | } else { |
| 1210 | outputMsg.innerText += msg |
| 1211 | } |
| 1212 | console.log(level, msg) |
| 1213 | } |
| 1214 | |
| 1215 | function logError(msg, res, outputMsg) { |
| 1216 | logMsg(msg, "error", outputMsg) |