266 lines
6.9 KiB
Java
266 lines
6.9 KiB
Java
package o;
|
|
|
|
import java.io.PrintWriter;
|
|
import java.io.StringWriter;
|
|
import java.io.Writer;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class guQ {
|
|
private static final List<RVV> d = new ArrayList();
|
|
static volatile RVV[] c = new RVV[0];
|
|
private static final RVV b = new RVV() { // from class: o.guQ.3
|
|
@Override // o.guQ.RVV
|
|
public final void d(String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.d(str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void b(Throwable th, String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.b(th, str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void c(String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.c(str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void e(Throwable th, String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.e(th, str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void c(Throwable th) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.c(th);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void b(String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.b(str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void a(String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.a(str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void d(Throwable th, String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.d(th, str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void a(Throwable th) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.a(th);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void e(String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.e(str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void a(Throwable th, String str, Object... objArr) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.a(th, str, objArr);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
public final void d(Throwable th) {
|
|
for (RVV rvv : guQ.c) {
|
|
rvv.d(th);
|
|
}
|
|
}
|
|
|
|
@Override // o.guQ.RVV
|
|
protected final void a(int i, String str, Throwable th) {
|
|
throw new AssertionError("Missing override for log method.");
|
|
}
|
|
};
|
|
|
|
public static void b(String str, Object... objArr) {
|
|
b.d(str, objArr);
|
|
}
|
|
|
|
public static void a(Throwable th, String str, Object... objArr) {
|
|
b.b(th, str, objArr);
|
|
}
|
|
|
|
public static void c(String str, Object... objArr) {
|
|
b.c(str, objArr);
|
|
}
|
|
|
|
public static void d(Throwable th, String str, Object... objArr) {
|
|
b.e(th, str, objArr);
|
|
}
|
|
|
|
public static void d(Throwable th) {
|
|
b.c(th);
|
|
}
|
|
|
|
public static void e(String str, Object... objArr) {
|
|
b.b(str, objArr);
|
|
}
|
|
|
|
public static void d(String str, Object... objArr) {
|
|
b.a(str, objArr);
|
|
}
|
|
|
|
public static void c(Throwable th, String str, Object... objArr) {
|
|
b.d(th, str, objArr);
|
|
}
|
|
|
|
public static void a(Throwable th) {
|
|
b.a(th);
|
|
}
|
|
|
|
public static void a(String str, Object... objArr) {
|
|
b.e(str, objArr);
|
|
}
|
|
|
|
public static void e(Throwable th, String str, Object... objArr) {
|
|
b.a(th, str, objArr);
|
|
}
|
|
|
|
public static void e(Throwable th) {
|
|
b.d(th);
|
|
}
|
|
|
|
public static RVV e(String str) {
|
|
for (RVV rvv : c) {
|
|
rvv.a.set(str);
|
|
}
|
|
return b;
|
|
}
|
|
|
|
public static void c(RVV rvv) {
|
|
List<RVV> list = d;
|
|
synchronized (list) {
|
|
list.add(rvv);
|
|
c = (RVV[]) list.toArray(new RVV[list.size()]);
|
|
}
|
|
}
|
|
|
|
private guQ() {
|
|
throw new AssertionError("No instances.");
|
|
}
|
|
|
|
/* loaded from: classes.dex */
|
|
public static abstract class RVV {
|
|
final ThreadLocal<String> a = new ThreadLocal<>();
|
|
|
|
protected abstract void a(int i, String str, Throwable th);
|
|
|
|
protected boolean d(int i) {
|
|
return true;
|
|
}
|
|
|
|
public void d(String str, Object... objArr) {
|
|
e(2, null, str, objArr);
|
|
}
|
|
|
|
public void b(Throwable th, String str, Object... objArr) {
|
|
e(2, th, str, objArr);
|
|
}
|
|
|
|
public void c(String str, Object... objArr) {
|
|
e(3, null, str, objArr);
|
|
}
|
|
|
|
public void e(Throwable th, String str, Object... objArr) {
|
|
e(3, th, str, objArr);
|
|
}
|
|
|
|
public void c(Throwable th) {
|
|
e(3, th, null, new Object[0]);
|
|
}
|
|
|
|
public void b(String str, Object... objArr) {
|
|
e(4, null, str, objArr);
|
|
}
|
|
|
|
public void a(String str, Object... objArr) {
|
|
e(5, null, str, objArr);
|
|
}
|
|
|
|
public void d(Throwable th, String str, Object... objArr) {
|
|
e(5, th, str, objArr);
|
|
}
|
|
|
|
public void a(Throwable th) {
|
|
e(5, th, null, new Object[0]);
|
|
}
|
|
|
|
public void e(String str, Object... objArr) {
|
|
e(6, null, str, objArr);
|
|
}
|
|
|
|
public void a(Throwable th, String str, Object... objArr) {
|
|
e(6, th, str, objArr);
|
|
}
|
|
|
|
public void d(Throwable th) {
|
|
e(6, th, null, new Object[0]);
|
|
}
|
|
|
|
private void e(int i, Throwable th, String str, Object... objArr) {
|
|
if (this.a.get() != null) {
|
|
this.a.remove();
|
|
}
|
|
if (d(i)) {
|
|
if (str != null && str.length() == 0) {
|
|
str = null;
|
|
}
|
|
if (str != null) {
|
|
if (objArr != null && objArr.length > 0) {
|
|
str = String.format(str, objArr);
|
|
}
|
|
if (th != null) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(str);
|
|
sb.append("\n");
|
|
sb.append(b(th));
|
|
str = sb.toString();
|
|
}
|
|
} else if (th == null) {
|
|
return;
|
|
} else {
|
|
str = b(th);
|
|
}
|
|
a(i, str, th);
|
|
}
|
|
}
|
|
|
|
private static String b(Throwable th) {
|
|
StringWriter stringWriter = new StringWriter(256);
|
|
PrintWriter printWriter = new PrintWriter((Writer) stringWriter, false);
|
|
th.printStackTrace(printWriter);
|
|
printWriter.flush();
|
|
return stringWriter.toString();
|
|
}
|
|
}
|
|
}
|