mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 23:56:07 +02:00
Use TinyLog for protocol logging
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -289,6 +289,11 @@ public class Log {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int w(String tag, String msg) {
|
||||
org.tinylog.Logger.tag(tag).warn(msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int w(Throwable ex) {
|
||||
if (BuildConfig.BETA_RELEASE)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user