Replace ASCII symbols that cannot be displayed in the logs

Before:
INFO[2023-05-06 01:46:19] build index for: [/]

After:
🔧[36mINFO🔧[0m[2023-05-06 01:46:19] build index for: [/]
This commit is contained in:
SpeedPartner 2023-05-06 22:20:52 +08:00 committed by GitHub
parent 62120eb0fe
commit 7af0cda04e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,9 @@
function(x, data) {
if(x && x.status == 200) {
var log_textarea = document.getElementById('log_textarea');
log_textarea.innerHTML = x.responseText;
var str = x.responseText;
var logs = str.replace(//g, "🔧");
log_textarea.innerHTML = logs;
if (!scrolled) {
log_textarea.scrollTop = log_textarea.scrollHeight;
scrolled = true;