Skip to content

Commit

Permalink
Delete invalid upload logs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxiaoping committed Jun 7, 2021
1 parent cd9a77b commit 25b375e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/com/seafile/seadroid2/SeafConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,10 @@ public Pair<String, String> getDirents(String repoID, String path, String cached
}

if (dirID.equals(cachedDirID)) {
Utils.utilsLogInfo(true, "====local cache is valid");
// local cache is valid
// Log.d(DEBUG_TAG, String.format("dir %s is cached", path));
content = null;
} else {
Utils.utilsLogInfo(true, "====local cache is invalid");
/*Log.d(DEBUG_TAG,
String.format("dir %s will be downloaded from server, latest %s, local cache %s",
path, dirID, cachedDirID != null ? cachedDirID : "null"));*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ public void onPerformSync(android.accounts.Account account,

try {
// Log.d(DEBUG_TAG, "Validating target repository...");
Utils.utilsLogInfo(true, "========Validating target repository.");
// make sure the repo exists
if (!validateRepository(dataManager)) {
/**
Expand All @@ -293,6 +292,7 @@ public void onPerformSync(android.accounts.Account account,
* instead we should display an error
*/
Log.e(DEBUG_TAG, "Sync aborted because the target repository does not exist");
Utils.utilsLogInfo(true, "========Sync aborted because the target repository does not exist.");
syncResult.databaseError = true;
showNotificationRepoError();
return;
Expand All @@ -306,7 +306,6 @@ public void onPerformSync(android.accounts.Account account,
int timeout = 1000; // wait up to a second
while (!isCancelled() && timeout > 0 && txService == null) {
// Log.d(DEBUG_TAG, "waiting for transfer service");
Utils.utilsLogInfo(true, "========waiting for transfer service.");
Thread.sleep(100);
timeout -= 100;
}
Expand Down Expand Up @@ -348,6 +347,7 @@ public void onPerformSync(android.accounts.Account account,
syncResult.stats.numAuthExceptions++;
// Log.i(DEBUG_TAG, "sync aborted because of authentication error.", e);
showNotificationAuthError();
Utils.utilsLogInfo(true, "======sync aborted because of authentication error---" + e);
break;
default:
syncResult.stats.numIoExceptions++;
Expand All @@ -366,7 +366,6 @@ public void onPerformSync(android.accounts.Account account,
txService.cancelUploadTasksByIds(tasksInProgress);

// Log.d(DEBUG_TAG, "disconnecting from TransferService");
Utils.utilsLogInfo(true, "======disconnecting from TransferService");
getContext().unbindService(mConnection);
txService = null;
}
Expand Down Expand Up @@ -429,7 +428,10 @@ private void uploadImages(SyncResult syncResult, DataManager dataManager) throws
return;

}
} finally {
} catch (Exception e){
Utils.utilsLogInfo(true,"===createDirectories--iterateCursor==Exception"+e);
}
finally {
if (cursor != null)
cursor.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,6 @@ public List<SeafDirent> getDirentsFromServer(String repoID, String path) throws
} else {
content = cachedContent;
}
Utils.utilsLogInfo(true, "====createDirectories==getDirentsFromServer==cachedDirID--" + cachedDirID + "===cacheFile--" + cacheFile.length());
return parseDirents(content);
}

Expand Down

0 comments on commit 25b375e

Please sign in to comment.