mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Replace stacktrace with timber log
This commit is contained in:
parent
9beb25d019
commit
11a2ec1d3e
@ -64,7 +64,7 @@ public class AccountUtils {
|
||||
webDavUrlForAccount = getBaseUrlForAccount(context, account) + OwnCloudClient.WEBDAV_FILES_PATH_4_0
|
||||
+ ownCloudCredentials.getUsername();
|
||||
} catch (OperationCanceledException | AuthenticatorException | IOException e) {
|
||||
e.printStackTrace();
|
||||
Timber.e(e);
|
||||
}
|
||||
|
||||
return webDavUrlForAccount;
|
||||
|
@ -31,8 +31,6 @@ import okhttp3.internal.Util;
|
||||
|
||||
public class OwnCloudBasicCredentials implements OwnCloudCredentials {
|
||||
|
||||
private static final String TAG = OwnCloudCredentials.class.getSimpleName();
|
||||
|
||||
private String mUsername;
|
||||
private String mPassword;
|
||||
|
||||
|
@ -33,8 +33,6 @@ import java.util.Map;
|
||||
|
||||
public class OAuth2QueryParser {
|
||||
|
||||
private static final String TAG = OAuth2QueryParser.class.getName();
|
||||
|
||||
private Map<String, String> mOAuth2ParsedAuthorizationResponse;
|
||||
|
||||
public OAuth2QueryParser() {
|
||||
|
@ -43,11 +43,8 @@ import java.security.cert.X509Certificate;
|
||||
*/
|
||||
public class AdvancedX509TrustManager implements X509TrustManager {
|
||||
|
||||
private static final String TAG = AdvancedX509TrustManager.class.getSimpleName();
|
||||
|
||||
private X509TrustManager mStandardTrustManager;
|
||||
private KeyStore mKnownServersKeyStore;
|
||||
|
||||
/**
|
||||
* Constructor for AdvancedX509TrustManager
|
||||
*
|
||||
|
@ -24,13 +24,12 @@
|
||||
|
||||
package com.owncloud.android.lib.common.network;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
import okio.BufferedSink;
|
||||
import okio.Okio;
|
||||
import okio.Source;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
@ -45,8 +44,6 @@ import java.util.Set;
|
||||
*/
|
||||
public class FileRequestBody extends RequestBody implements ProgressiveDataTransferer {
|
||||
|
||||
private static final String TAG = FileRequestBody.class.getSimpleName();
|
||||
|
||||
protected File mFile;
|
||||
private MediaType mContentType;
|
||||
final Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<>();
|
||||
@ -87,11 +84,10 @@ public class FileRequestBody extends RequestBody implements ProgressiveDataTrans
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(TAG, "File with name " + mFile.getName() + " and size " + mFile.length() +
|
||||
" written in request body");
|
||||
Timber.d("File with name " + mFile.getName() + " and size " + mFile.length() + " written in request body");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Timber.e(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,6 @@
|
||||
|
||||
package com.owncloud.android.lib.resources.files;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.http.HttpConstants;
|
||||
import com.owncloud.android.lib.common.http.methods.webdav.CopyMethod;
|
||||
@ -33,6 +31,7 @@ import com.owncloud.android.lib.common.network.WebdavUtils;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -49,8 +48,6 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class CopyRemoteFileOperation extends RemoteOperation<String> {
|
||||
|
||||
private static final String TAG = CopyRemoteFileOperation.class.getSimpleName();
|
||||
|
||||
private static final int COPY_READ_TIMEOUT = 600000;
|
||||
private static final int COPY_CONNECTION_TIMEOUT = 5000;
|
||||
|
||||
@ -120,13 +117,11 @@ public class CopyRemoteFileOperation extends RemoteOperation<String> {
|
||||
client.exhaustResponse(copyMethod.getResponseBodyAsStream());
|
||||
}
|
||||
|
||||
Log.i(TAG, "Copy " + mSrcRemotePath + " to " + mTargetRemotePath + ": " +
|
||||
result.getLogMessage());
|
||||
Timber.i("Copy " + mSrcRemotePath + " to " + mTargetRemotePath + ": " + result.getLogMessage());
|
||||
|
||||
} catch (Exception e) {
|
||||
result = new RemoteOperationResult<>(e);
|
||||
Log.e(TAG, "Copy " + mSrcRemotePath + " to " + mTargetRemotePath + ": " +
|
||||
result.getLogMessage(), e);
|
||||
Timber.e(e, "Copy " + mSrcRemotePath + " to " + mTargetRemotePath + ": " + result.getLogMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -25,7 +25,6 @@
|
||||
package com.owncloud.android.lib.resources.files;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
import com.owncloud.android.lib.common.http.HttpConstants;
|
||||
@ -34,6 +33,7 @@ import com.owncloud.android.lib.common.network.WebdavUtils;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
import timber.log.Timber;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -49,8 +49,6 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class MoveRemoteFileOperation extends RemoteOperation {
|
||||
|
||||
private static final String TAG = MoveRemoteFileOperation.class.getSimpleName();
|
||||
|
||||
private static final int MOVE_READ_TIMEOUT = 600000;
|
||||
private static final int MOVE_CONNECTION_TIMEOUT = 5000;
|
||||
|
||||
@ -132,13 +130,11 @@ public class MoveRemoteFileOperation extends RemoteOperation {
|
||||
client.exhaustResponse(move.getResponseBodyAsStream());
|
||||
}
|
||||
|
||||
Log.i(TAG, "Move " + mSrcRemotePath + " to " + mTargetRemotePath + ": " +
|
||||
result.getLogMessage());
|
||||
Timber.i("Move " + mSrcRemotePath + " to " + mTargetRemotePath + ": " + result.getLogMessage());
|
||||
|
||||
} catch (Exception e) {
|
||||
result = new RemoteOperationResult<>(e);
|
||||
Log.e(TAG, "Move " + mSrcRemotePath + " to " + mTargetRemotePath + ": " +
|
||||
result.getLogMessage(), e);
|
||||
Timber.e(e, "Move " + mSrcRemotePath + " to " + mTargetRemotePath + ": " + result.getLogMessage());
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -99,8 +99,7 @@ public class ReadRemoteFileOperation extends RemoteOperation<RemoteFile> {
|
||||
|
||||
} catch (Exception e) {
|
||||
result = new RemoteOperationResult<>(e);
|
||||
e.printStackTrace();
|
||||
Timber.e(result.getException(), "Synchronizing file " + mRemotePath + ": " + result.getLogMessage());
|
||||
Timber.e(e, "Synchronizing file %s", mRemotePath);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -383,8 +383,6 @@ class ShareXMLParser {
|
||||
|
||||
companion object {
|
||||
|
||||
//private static final String TAG = ShareXMLParser.class.getSimpleName();
|
||||
|
||||
// No namespaces
|
||||
private val ns: String? = null
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user