use of com.google.firebase.crashlytics.internal.Logger in project GreenHouse by utsanjan.
the class ReportUploader method uploadReport.
public boolean uploadReport(Report report, boolean dataCollectionToken) {
try {
CreateReportRequest requestData = new CreateReportRequest(this.organizationId, this.googleAppId, report);
boolean shouldDeleteReport = true;
if (this.dataTransportState == DataTransportState.ALL) {
Logger.getLogger().d("Send to Reports Endpoint disabled. Removing Reports Endpoint report.");
} else if (this.dataTransportState == DataTransportState.JAVA_ONLY && report.getType() == Report.Type.JAVA) {
Logger.getLogger().d("Send to Reports Endpoint for non-native reports disabled. Removing Reports Uploader report.");
} else {
boolean sent = this.createReportCall.invoke(requestData, dataCollectionToken);
Logger logger = Logger.getLogger();
StringBuilder sb = new StringBuilder();
sb.append("Crashlytics Reports Endpoint upload ");
sb.append(sent ? "complete: " : "FAILED: ");
sb.append(report.getIdentifier());
logger.i(sb.toString());
shouldDeleteReport = sent;
}
if (!shouldDeleteReport) {
return false;
}
this.reportManager.deleteReport(report);
return true;
} catch (Exception e) {
Logger logger2 = Logger.getLogger();
logger2.e("Error occurred sending report " + report, e);
return false;
}
}
use of com.google.firebase.crashlytics.internal.Logger in project GreenHouse by utsanjan.
the class SessionReportingCoordinator method onReportSendComplete.
/* JADX INFO: Access modifiers changed from: private */
public boolean onReportSendComplete(Task<CrashlyticsReportWithSessionId> task) {
if (task.isSuccessful()) {
CrashlyticsReportWithSessionId report = task.getResult();
Logger logger = Logger.getLogger();
logger.d("Crashlytics report successfully enqueued to DataTransport: " + report.getSessionId());
this.reportPersistence.deleteFinalizedReport(report.getSessionId());
return true;
}
Logger.getLogger().d("Crashlytics report could not be enqueued to DataTransport", task.getException());
return false;
}
use of com.google.firebase.crashlytics.internal.Logger in project GreenHouse by utsanjan.
the class DefaultCreateReportSpiCall method invoke.
// com.google.firebase.crashlytics.internal.report.network.CreateReportSpiCall
@Override
public boolean invoke(CreateReportRequest requestData, boolean dataCollectionToken) {
if (dataCollectionToken) {
HttpRequest httpRequest = getHttpRequest();
HttpRequest httpRequest2 = applyMultipartDataTo(applyHeadersTo(httpRequest, requestData), requestData.report);
Logger logger = Logger.getLogger();
logger.d("Sending report to: " + getUrl());
try {
HttpResponse httpResponse = httpRequest2.execute();
int statusCode = httpResponse.code();
Logger logger2 = Logger.getLogger();
logger2.d("Create report request ID: " + httpResponse.header(AbstractSpiCall.HEADER_REQUEST_ID));
Logger logger3 = Logger.getLogger();
logger3.d("Result was: " + statusCode);
return ResponseParser.parse(statusCode) == 0;
} catch (IOException ioe) {
Logger.getLogger().e("Create report HTTP request failed.", ioe);
throw new RuntimeException(ioe);
}
} else {
throw new RuntimeException("An invalid data collection token was used.");
}
}
use of com.google.firebase.crashlytics.internal.Logger in project GreenHouse by utsanjan.
the class SettingsController method logSettings.
/* JADX INFO: Access modifiers changed from: private */
public void logSettings(JSONObject json, String message) throws JSONException {
Logger logger = Logger.getLogger();
logger.d(message + json.toString());
}
use of com.google.firebase.crashlytics.internal.Logger in project GreenHouse by utsanjan.
the class BinaryImagesConverter method jsonFromMapEntryString.
private JSONObject jsonFromMapEntryString(String mapEntryString) {
ProcMapEntry mapInfo = ProcMapEntryParser.parse(mapEntryString);
if (mapInfo == null || !isRelevant(mapInfo)) {
return null;
}
String path = mapInfo.path;
File binFile = getLibraryFile(path);
try {
String uuid = this.fileIdStrategy.createId(binFile);
try {
return createBinaryImageJson(uuid, mapInfo);
} catch (JSONException e) {
Logger.getLogger().d("Could not create a binary image json string", e);
return null;
}
} catch (IOException e2) {
Logger logger = Logger.getLogger();
logger.d("Could not generate ID for file " + mapInfo.path, e2);
return null;
}
}
Aggregations