mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-15 07:56:58 +03:00
write logfile logs earlier, shorten startup banner, add uptime to logfile (#1443)
Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -1268,7 +1268,7 @@ textarea {
|
||||
<input type="number" id="AutoTimer_Intervall_value1" size="13" min="3" step="any">
|
||||
</td>
|
||||
<td style="font-size: 80%;">
|
||||
Interval in which the number(s) are read (in minutes). If a run takes longer than this interval, the next run gets postponed until the current run completes.
|
||||
Interval in which the number(s) are read (in minutes). If a digitalization round takes longer than this interval, the next run gets postponed until the current run completes.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@
|
||||
|
||||
|
||||
function processLogLine(line, index, arr) {
|
||||
/* Make sure the whitespaces in the uptime field get persevered */
|
||||
uptimePart = line.slice(0, line.indexOf("]")).replace(/ /g, " ");
|
||||
line = uptimePart + line.slice(line.indexOf("]"))
|
||||
|
||||
if (line.includes("<WRN>")) {
|
||||
arr[index] = "<span style=\"color:#e83c00\">" + line + "</span>";
|
||||
}
|
||||
@@ -66,7 +70,10 @@
|
||||
else if (line.includes("<DBG>")) {
|
||||
arr[index] = "<span style=\"color:gray\">" + line + "</span>";
|
||||
}
|
||||
|
||||
else {
|
||||
arr[index] = line;
|
||||
}
|
||||
|
||||
arr[index] += "<br>";
|
||||
}
|
||||
|
||||
@@ -80,7 +87,8 @@
|
||||
return res.text();
|
||||
})
|
||||
.then((log) => {
|
||||
log = log.replace(/</g, "<").replace(/>/g, ">");
|
||||
log = log.replace(/</g, "<");
|
||||
log = log.replace(/>/g, ">");
|
||||
logArr = log.split("\n");
|
||||
logArr.forEach(processLogLine);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user