what-the-bank/sources/o/C15229gkp.java

70 lines
2.6 KiB
Java

package o;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
/* renamed from: o.gkp, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public class C15229gkp implements InterfaceC15219gkf, Serializable {
private String a;
private transient Logger b;
private String c;
private boolean d;
private String e;
@Override // o.InterfaceC15219gkf
public final void d(Object obj, Throwable th) {
Level level = Level.FINE;
String valueOf = String.valueOf(obj);
if (this.b == null) {
this.b = Logger.getLogger(null);
}
if (this.b.isLoggable(level)) {
LogRecord logRecord = new LogRecord(level, valueOf);
if (!this.d) {
try {
Throwable th2 = new Throwable();
th2.fillInStackTrace();
StringWriter stringWriter = new StringWriter();
th2.printStackTrace(new PrintWriter(stringWriter));
StringTokenizer stringTokenizer = new StringTokenizer(stringWriter.getBuffer().toString(), "\n");
stringTokenizer.nextToken();
String nextToken = stringTokenizer.nextToken();
while (nextToken.indexOf(getClass().getName()) == -1) {
nextToken = stringTokenizer.nextToken();
}
while (nextToken.indexOf(getClass().getName()) >= 0) {
nextToken = stringTokenizer.nextToken();
}
String substring = nextToken.substring(nextToken.indexOf("at ") + 3, nextToken.indexOf(40));
int lastIndexOf = substring.lastIndexOf(46);
this.a = substring.substring(0, lastIndexOf);
this.e = substring.substring(lastIndexOf + 1);
} catch (Exception unused) {
}
this.d = true;
}
logRecord.setSourceClassName(this.a);
logRecord.setSourceMethodName(this.e);
logRecord.setThrown(th);
if (this.b == null) {
this.b = Logger.getLogger(null);
}
this.b.log(logRecord);
}
}
@Override // o.InterfaceC15219gkf
public final boolean e() {
if (this.b == null) {
this.b = Logger.getLogger(null);
}
return this.b.isLoggable(Level.FINE);
}
}