- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
74 lines
2.5 KiB
Java
74 lines
2.5 KiB
Java
package com.helpshift.log;
|
|
|
|
import android.util.Log;
|
|
import com.helpshift.log.ILogger;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class InternalHelpshiftLogger implements ILogger {
|
|
public final boolean isAppInDebugMode;
|
|
public LogCollector logCollector;
|
|
public final boolean shouldEnableLogging;
|
|
|
|
public void setLogCollector(LogCollector logCollector) {
|
|
this.logCollector = logCollector;
|
|
}
|
|
|
|
public InternalHelpshiftLogger(boolean z, boolean z2) {
|
|
this.isAppInDebugMode = z;
|
|
this.shouldEnableLogging = z2;
|
|
}
|
|
|
|
@Override // com.helpshift.log.ILogger
|
|
public void d(String str, String str2, Throwable th) {
|
|
logMessage(ILogger.LEVEL.DEBUG, str, str2, th);
|
|
}
|
|
|
|
@Override // com.helpshift.log.ILogger
|
|
public void w(String str, String str2, Throwable th) {
|
|
logMessage(ILogger.LEVEL.WARN, str, str2, th);
|
|
}
|
|
|
|
@Override // com.helpshift.log.ILogger
|
|
public void e(String str, String str2, Throwable th) {
|
|
logMessage(ILogger.LEVEL.ERROR, str, str2, th);
|
|
}
|
|
|
|
public final void logMessage(ILogger.LEVEL level, String str, String str2, Throwable th) {
|
|
if (this.shouldEnableLogging) {
|
|
String str3 = str + " : " + str2;
|
|
int i = AnonymousClass1.$SwitchMap$com$helpshift$log$ILogger$LEVEL[level.ordinal()];
|
|
if (i == 1) {
|
|
Log.e("Helpshift", str3, th);
|
|
} else if (i == 2) {
|
|
Log.w("Helpshift", str3, th);
|
|
}
|
|
LogCollector logCollector = this.logCollector;
|
|
if (logCollector != null) {
|
|
logCollector.collectLog("Helpshift", str3, th, level);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* renamed from: com.helpshift.log.InternalHelpshiftLogger$1, reason: invalid class name */
|
|
public static /* synthetic */ class AnonymousClass1 {
|
|
public static final /* synthetic */ int[] $SwitchMap$com$helpshift$log$ILogger$LEVEL;
|
|
|
|
static {
|
|
int[] iArr = new int[ILogger.LEVEL.values().length];
|
|
$SwitchMap$com$helpshift$log$ILogger$LEVEL = iArr;
|
|
try {
|
|
iArr[ILogger.LEVEL.ERROR.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.WARN.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.DEBUG.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
}
|
|
}
|
|
}
|