MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / logMsg

Function logMsg

ui/media/js/utils.js:1201–1213  ·  view source on GitHub ↗
(msg, level, outputMsg)

Source from the content-addressed store, hash-verified

1199}
1200
1201function 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
1215function logError(msg, res, outputMsg) {
1216 logMsg(msg, "error", outputMsg)

Callers 1

logErrorFunction · 0.85

Calls 1

appendChildMethod · 0.45

Tested by

no test coverage detected