正在查看: Brevistay v5.8.2 应用的 LogConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Brevistay v5.8.2 应用的 LogConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.juspay.hypersdk.analytics;
import com.google.firebase.perf.util.Constants;
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;
JSONObject logHeaders;
int logPostInterval;
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;
LogConfig(JSONObject jSONObject, JSONObject jSONObject2) {
this.minMemoryRequired = 16384L;
this.maxLogLineSize = 20971520L;
this.maxLogFileSize = 20971520L;
this.maxLogValueSize = 32768L;
this.maxFilesAllowed = 7;
this.numFilesToLeaveIfMaxFilesExceeded = 5;
this.dontPushIfFileIsLastModifiedBeforeInHours = 720L;
this.logPostInterval = Constants.MAX_URL_LENGTH;
this.logSessioniseInterval = Constants.MAX_URL_LENGTH;
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 optJSONObject = jSONObject.optJSONObject("logsConfig");
optJSONObject = optJSONObject == null ? new JSONObject() : optJSONObject;
this.maxLogLineSize = optJSONObject.optLong("maxLogLineSize", 20971520L);
this.maxLogFileSize = optJSONObject.optLong("maxLogFileSize", 20971520L);
this.minMemoryRequired = optJSONObject.optLong("minMemoryRequired", 16384L);
this.maxFilesAllowed = optJSONObject.optInt("maxFilesAllowed", 7);
this.maxLogValueSize = optJSONObject.optLong("maxLogValueSize", 32768L);
this.folderSizeLimit = optJSONObject.optLong("folderSizeLimit", 52428800L);
this.filesCountLimit = optJSONObject.optLong("filesCountLimit", 200L);
this.maxSizeLimitPerPush = optJSONObject.optLong("maxSizeLimitPerPush", 204800L);
this.encryptionLevel = optJSONObject.optString("encryptionLevelKey", "encryption");
this.publicKeySandbox = optJSONObject.optJSONObject("publicKeySandbox");
this.publicKey = optJSONObject.optJSONObject("publicKey");
this.channels = optJSONObject.optJSONObject("channels");
this.defaultChannels = jSONObject.optJSONArray("defaultChannels");
this.numFilesToLeaveIfMaxFilesExceeded = optJSONObject.optInt("numFilesToLeaveIfMaxFilesExceeded", 5);
this.dontPushIfFileIsLastModifiedBeforeInHours = optJSONObject.optLong("dontPushIfFileIsLastModifiedBeforeInHours", 720L);
this.shouldPush = optJSONObject.optBoolean("shouldPush", true);
String optString = optJSONObject.optString("logsUrlKeySandbox", "");
if (optString.isEmpty()) {
optString = jSONObject2 != null ? jSONObject2.optString("sandboxLogUrl", this.sandboxLogUrl) : this.sandboxLogUrl;
}
this.sandboxLogUrl = optString;
String optString2 = optJSONObject.optString("logsUrlKey", "");
if (optString2.isEmpty()) {
optString2 = jSONObject2 != null ? jSONObject2.optString("prodLogUrl", this.prodLogUrl) : this.prodLogUrl;
}
this.prodLogUrl = optString2;
this.defaultPriority = optJSONObject.optInt("defaultPriority", 5);
this.maxRetryPerBatch = optJSONObject.optInt("retryAttempts", -1);
this.maxLogsPerPush = optJSONObject.optLong("batchCount", 75L);
this.logPostInterval = optJSONObject.optInt("logPusherTimerWithChannel", Constants.MAX_URL_LENGTH);
this.logSessioniseInterval = optJSONObject.optInt("sessioniseTimer", Constants.MAX_URL_LENGTH);
this.logChannelsConfig = jSONObject.optJSONArray("logChannelsConfig");
if (optJSONObject.has("logHeaders")) {
this.logHeaders = optJSONObject.getJSONObject("logHeaders");
}
if (optJSONObject.has("logProperties")) {
this.logProperties = optJSONObject.getJSONObject("logProperties");
}
if (optJSONObject.has("allowWhileBuffering")) {
this.allowWhileBuffering = optJSONObject.getJSONArray("allowWhileBuffering");
}
if (optJSONObject.has("fileFormat")) {
this.fileFormat = optJSONObject.optString("fileFormat", "prefixByte");
}
if (optJSONObject.has("fallBackUrl")) {
this.fallBackUrl = optJSONObject.optJSONArray("fallBackUrl");
}
if (optJSONObject.has("fallBackPublicKeys")) {
this.fallBackPublicKeys = optJSONObject.optJSONArray("fallBackPublicKeys");
}
if (optJSONObject.has("errorUrl")) {
this.errorUrl = optJSONObject.optString("errorUrl", "");
}
} catch (Exception unused) {
}
}
}
}