Use TinyLog for protocol logging

This commit is contained in:
M66B
2023-12-14 15:55:51 +01:00
parent 067c3e3a59
commit f747721559
2 changed files with 10 additions and 8 deletions

View File

@@ -786,14 +786,11 @@ public class EmailService implements AutoCloseable {
try {
if (((char) b) == '\n') {
String line = bos.toString();
if (!line.endsWith("ignoring socket timeout"))
if (log)
EntityLog.log(context, EntityLog.Type.Protocol, user + " " + line);
else {
breadcrumbs.push(line);
if (BuildConfig.DEBUG)
Log.i("javamail", user + " " + line);
}
if (log)
if (line.endsWith("ignoring socket timeout"))
Log.d("javamail", user + " " + line);
else
Log.w("javamail", user + " " + line);
bos.reset();
} else
bos.write(b);