package com.singular.sdk.internal; import android.util.Log; import com.mbridge.msdk.out.reveue.MBridgeRevenueParamsEntity; /* loaded from: classes4.dex */ public class SingularLog { public static boolean ENABLE_LOGGING = false; public static int LOG_LEVEL = 6; public final String TAG = MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR; public final String tag; public boolean shouldLog(int i) { return ENABLE_LOGGING && LOG_LEVEL <= i; } public SingularLog(String str) { this.tag = str; } public static SingularLog getLogger(String str) { return new SingularLog(str); } public String text(String str) { return String.format("%s [%s] - %s", this.tag, getThreadInfo(), str); } public boolean isDebugEnabled() { return shouldLog(3); } public int debug(String str) { if (shouldLog(3)) { return Log.d(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(str)); } return 0; } public int debug(String str, Object... objArr) { if (shouldLog(3)) { return Log.d(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(String.format(str, objArr))); } return 0; } public int info(String str) { if (shouldLog(4)) { return Log.i(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(str)); } return 0; } public int error(String str) { if (shouldLog(6)) { return Log.e(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(str)); } return 0; } public int error(String str, Throwable th) { if (shouldLog(6)) { return Log.e(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(str), th); } return 0; } public int error(String str, Object... objArr) { if (shouldLog(6)) { return Log.e(MBridgeRevenueParamsEntity.ATTRIBUTION_PLATFORM_SINGULAR, text(String.format(str, objArr))); } return 0; } public static String getThreadInfo() { return String.format("%s", Thread.currentThread().getName()); } }