- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
90 lines
2.2 KiB
Java
90 lines
2.2 KiB
Java
package com.google.firebase.perf.logging;
|
|
|
|
import java.util.Locale;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class AndroidLogger {
|
|
public static volatile AndroidLogger instance;
|
|
public boolean isLogcatEnabled;
|
|
public final LogWrapper logWrapper;
|
|
|
|
public boolean isLogcatEnabled() {
|
|
return this.isLogcatEnabled;
|
|
}
|
|
|
|
public void setLogcatEnabled(boolean z) {
|
|
this.isLogcatEnabled = z;
|
|
}
|
|
|
|
public static AndroidLogger getInstance() {
|
|
if (instance == null) {
|
|
synchronized (AndroidLogger.class) {
|
|
try {
|
|
if (instance == null) {
|
|
instance = new AndroidLogger();
|
|
}
|
|
} finally {
|
|
}
|
|
}
|
|
}
|
|
return instance;
|
|
}
|
|
|
|
public AndroidLogger(LogWrapper logWrapper) {
|
|
this.isLogcatEnabled = false;
|
|
this.logWrapper = logWrapper == null ? LogWrapper.getInstance() : logWrapper;
|
|
}
|
|
|
|
public AndroidLogger() {
|
|
this(null);
|
|
}
|
|
|
|
public void debug(String str) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.d(str);
|
|
}
|
|
}
|
|
|
|
public void debug(String str, Object... objArr) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.d(String.format(Locale.ENGLISH, str, objArr));
|
|
}
|
|
}
|
|
|
|
public void info(String str) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.i(str);
|
|
}
|
|
}
|
|
|
|
public void info(String str, Object... objArr) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.i(String.format(Locale.ENGLISH, str, objArr));
|
|
}
|
|
}
|
|
|
|
public void warn(String str) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.w(str);
|
|
}
|
|
}
|
|
|
|
public void warn(String str, Object... objArr) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.w(String.format(Locale.ENGLISH, str, objArr));
|
|
}
|
|
}
|
|
|
|
public void error(String str) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.e(str);
|
|
}
|
|
}
|
|
|
|
public void error(String str, Object... objArr) {
|
|
if (this.isLogcatEnabled) {
|
|
this.logWrapper.e(String.format(Locale.ENGLISH, str, objArr));
|
|
}
|
|
}
|
|
}
|