Skip to content

Commit

Permalink
refine FileLog
Browse files Browse the repository at this point in the history
  • Loading branch information
luvletter2333 committed Apr 4, 2023
1 parent 794d0c2 commit 68f4193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public static void d(final String message) {
}
ensureInitied();
String tag = mkTag();
Log.d(tag, message);
// Log.d(tag, message);
if (getInstance().streamWriter != null) {
getInstance().logQueue.postRunnable(() -> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7466,7 +7466,8 @@ private void updateRowsIds() {
}
if (BuildVars.LOGS_ENABLED) {
sendLogsRow = rowCount++;
sendLastLogsRow = rowCount++;
sendLastLogsRow = -1;
// disable send last logs
clearLogsRow = rowCount++;
}
versionRow = rowCount++;
Expand Down Expand Up @@ -9029,6 +9030,7 @@ public static void sendLogs(Activity activity, boolean last) {
if (activity == null) {
return;
}
// always send last logs
AlertDialog progressDialog = new AlertDialog(activity, AlertDialog.ALERT_TYPE_SPINNER);
progressDialog.setCanCancel(false);
progressDialog.show();
Expand Down Expand Up @@ -9075,7 +9077,7 @@ public static void sendLogs(Activity activity, boolean last) {

for (int i = 0; i < files.size(); i++) {
File file = files.get(i);
if (!file.getName().contains("cache4") && (last || file.getName().contains("_mtproto")) && (currentDate - file.lastModified()) > 24 * 60 * 60 * 1000) {
if (!file.getName().contains("cache4") && (file.getName().contains("_mtproto")) && (currentDate - file.lastModified()) > 24 * 60 * 60 * 1000) {
continue;
}
if (!file.exists()) {
Expand Down

0 comments on commit 68f4193

Please sign in to comment.