logging: remove control characters to prevent messing up the console

This commit is contained in:
yushijinhun 2020-08-23 01:34:24 +08:00
parent e913d7d4d4
commit 244fe2e969
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4

View file

@ -47,6 +47,8 @@ public final class Logging {
pw.close();
log += sw.toString();
}
// remove control characters to prevent messing up the console
log = log.replaceAll("[\\p{Cc}&&[^\r\n\t]]", "");
out.println(log);
}
}