正在查看: Oolka v2.4.42 应用的 LogConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 LogConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.juspay.hypersdk.analytics;
import androidx.annotation.NonNull;
import okhttp3.internal.http2.Http2Stream;
import org.json.JSONArray;
import org.json.JSONObject;
public class LogConfig {
JSONArray allowWhileBuffering;
JSONObject channels;
JSONArray defaultChannels;
int defaultPriority;
long dontPushIfFileIsLastModifiedBeforeInHours;
String encryptionLevel;
public String errorUrl;
public JSONArray fallBackPublicKeys;
public JSONArray fallBackUrl;
public String fileFormat;
long filesCountLimit;
long folderSizeLimit;
JSONArray logChannelsConfig;
@NonNull
JSONObject logHeaders;
int logPostInterval;
@NonNull
public JSONObject logProperties;
int logSessioniseInterval;
int maxFilesAllowed;
long maxLogFileSize;
long maxLogLineSize;
long maxLogValueSize;
long maxLogsPerPush;
int maxRetryPerBatch;
long maxSizeLimitPerPush;
long minMemoryRequired;
int numFilesToLeaveIfMaxFilesExceeded;
String prodLogUrl;
JSONObject publicKey;
JSONObject publicKeySandbox;
String sandboxLogUrl;
public boolean shouldPush;
public LogConfig(JSONObject jSONObject, JSONObject jSONObject2) {
this.minMemoryRequired = Http2Stream.EMIT_BUFFER_SIZE;
this.maxLogLineSize = 20971520L;
this.maxLogFileSize = 20971520L;
this.maxLogValueSize = 32768L;
this.maxFilesAllowed = 7;
this.numFilesToLeaveIfMaxFilesExceeded = 5;
this.dontPushIfFileIsLastModifiedBeforeInHours = 720L;
this.logPostInterval = 2000;
this.logSessioniseInterval = 2000;
this.encryptionLevel = "encryption";
this.maxLogsPerPush = 75L;
this.maxSizeLimitPerPush = 204800L;
this.maxRetryPerBatch = -1;
this.defaultPriority = 5;
this.folderSizeLimit = 52428800L;
this.filesCountLimit = 200L;
this.publicKeySandbox = new JSONObject();
this.publicKey = new JSONObject();
this.channels = new JSONObject();
this.logChannelsConfig = new JSONArray();
this.defaultChannels = new JSONArray();
this.sandboxLogUrl = "https://debug.logs.juspay.net/godel/analytics";
this.prodLogUrl = "https://logs.juspay.in/godel/analytics";
this.shouldPush = true;
this.fileFormat = "prefixByte";
this.fallBackUrl = new JSONArray();
this.fallBackPublicKeys = new JSONArray();
this.errorUrl = "";
this.logHeaders = new JSONObject();
this.logProperties = new JSONObject();
this.allowWhileBuffering = new JSONArray();
if (jSONObject != null) {
try {
JSONObject jSONObject3 = jSONObject.getJSONObject("logsConfig");
this.maxLogLineSize = jSONObject3.optLong("maxLogLineSize", 20971520L);
this.maxLogFileSize = jSONObject3.optLong("maxLogFileSize", 20971520L);
this.minMemoryRequired = jSONObject3.optLong("minMemoryRequired", Http2Stream.EMIT_BUFFER_SIZE);
this.maxFilesAllowed = jSONObject3.optInt("maxFilesAllowed", 7);
this.maxLogValueSize = jSONObject3.optLong("maxLogValueSize", 32768L);
this.folderSizeLimit = jSONObject3.optLong("folderSizeLimit", 52428800L);
this.filesCountLimit = jSONObject3.optLong("filesCountLimit", 200L);
this.maxSizeLimitPerPush = jSONObject3.optLong("maxSizeLimitPerPush", 204800L);
this.encryptionLevel = jSONObject3.optString("encryptionLevelKey", "encryption");
this.publicKeySandbox = jSONObject3.optJSONObject("publicKeySandbox");
this.publicKey = jSONObject3.optJSONObject("publicKey");
this.channels = jSONObject3.optJSONObject("channels");
this.defaultChannels = jSONObject.optJSONArray("defaultChannels");
this.numFilesToLeaveIfMaxFilesExceeded = jSONObject3.optInt("numFilesToLeaveIfMaxFilesExceeded", 5);
this.dontPushIfFileIsLastModifiedBeforeInHours = jSONObject3.optLong("dontPushIfFileIsLastModifiedBeforeInHours", 720L);
this.shouldPush = jSONObject3.optBoolean("shouldPush", true);
this.sandboxLogUrl = jSONObject2 != null ? jSONObject2.optString("sandboxLogUrl", jSONObject3.optString("logsUrlKeySandbox", this.sandboxLogUrl)) : jSONObject3.optString("logsUrlKeySandbox", this.sandboxLogUrl);
this.prodLogUrl = jSONObject2 != null ? jSONObject2.optString("prodLogUrl", jSONObject3.optString("logsUrlKey", this.prodLogUrl)) : jSONObject3.optString("logsUrlKey", this.prodLogUrl);
this.defaultPriority = jSONObject3.optInt("defaultPriority", 5);
this.maxRetryPerBatch = jSONObject3.optInt("retryAttempts", -1);
this.maxLogsPerPush = jSONObject3.optLong("batchCount", 75L);
this.logPostInterval = jSONObject3.optInt("logPusherTimerWithChannel", 2000);
this.logSessioniseInterval = jSONObject3.optInt("sessioniseTimer", 2000);
this.logChannelsConfig = jSONObject.optJSONArray("logChannelsConfig");
if (jSONObject3.has("logHeaders")) {
this.logHeaders = jSONObject3.getJSONObject("logHeaders");
}
if (jSONObject3.has("logProperties")) {
this.logProperties = jSONObject3.getJSONObject("logProperties");
}
if (jSONObject3.has("allowWhileBuffering")) {
this.allowWhileBuffering = jSONObject3.getJSONArray("allowWhileBuffering");
}
if (jSONObject3.has("fileFormat")) {
this.fileFormat = jSONObject3.optString("fileFormat", "prefixByte");
}
if (jSONObject3.has("fallBackUrl")) {
this.fallBackUrl = jSONObject3.optJSONArray("fallBackUrl");
}
if (jSONObject3.has("fallBackPublicKeys")) {
this.fallBackPublicKeys = jSONObject3.optJSONArray("fallBackPublicKeys");
}
if (jSONObject3.has("errorUrl")) {
this.errorUrl = jSONObject3.optString("errorUrl", "");
}
} catch (Exception unused) {
}
}
}
}