Add info log for uploader and downloader

This commit is contained in:
drive
2026-05-06 16:45:42 +02:00
parent fd1ecbbee8
commit dc80f26ef2
2 changed files with 8 additions and 2 deletions
@@ -37,7 +37,6 @@ import proton.drive.sdk.driveClientGetNodeRequest
import proton.drive.sdk.driveClientRenameRequest
import proton.drive.sdk.driveClientRestoreNodesRequest
import proton.drive.sdk.driveClientTrashNodesRequest
import proton.drive.sdk.drivePhotosClientGetNodeRequest
import java.time.Instant
import kotlin.time.Duration
@@ -235,6 +234,7 @@ internal class InteropProtonDriveClient internal constructor(
revisionUid: RevisionUid,
timeout: Duration,
): Downloader = withTimeout(timeout) {
log(INFO, "downloader")
cancellationCoroutineScope { source ->
factory(JniFileDownloader()) {
FileDownloader(
@@ -255,6 +255,7 @@ internal class InteropProtonDriveClient internal constructor(
request: FileUploaderRequest,
timeout: Duration,
): Uploader = withTimeout(timeout) {
log(INFO, "fileUploader")
cancellationCoroutineScope { source ->
JniFileUploader().run {
FileUploader(
@@ -275,6 +276,7 @@ internal class InteropProtonDriveClient internal constructor(
request: FileRevisionUploaderRequest,
timeout: Duration,
): Uploader = withTimeout(timeout) {
log(INFO, "fileRevisionUploader")
cancellationCoroutineScope { source ->
JniFileUploader().run {
FileUploader(
@@ -77,7 +77,9 @@ internal class InteropProtonPhotosClient internal constructor(
}
}
override suspend fun getNode(nodeUid: NodeUid): NodeResult? = cancellationCoroutineScope { source ->
override suspend fun getNode(
nodeUid: NodeUid,
): NodeResult? = cancellationCoroutineScope { source ->
log(DEBUG, "getNode")
bridge.getNode(
drivePhotosClientGetNodeRequest {
@@ -158,6 +160,7 @@ internal class InteropProtonPhotosClient internal constructor(
photoUid: NodeUid,
timeout: Duration,
): Downloader = withTimeout(timeout) {
log(INFO, "downloader")
cancellationCoroutineScope { source ->
factory(JniPhotosDownloader()) {
PhotosDownloader(
@@ -178,6 +181,7 @@ internal class InteropProtonPhotosClient internal constructor(
request: PhotosUploaderRequest,
timeout: Duration,
): Uploader = withTimeout(timeout) {
log(INFO, "photosUploader")
cancellationCoroutineScope { source ->
JniPhotosUploader().run {
PhotosUploader(