@@ -280,7 +280,7 @@ cliSendFileOpts SendOptions {filePath, outputDir, numRecipients, xftpServers, re
280280 let chunkSpecs = prepareChunkSpecs encPath chunkSizes
281281 fdRcv = FileDescription {party = SFRecipient , size = FileSize encSize, digest = FileDigest digest, key, nonce, chunkSize = FileSize defChunkSize, chunks = [] , redirect = Nothing }
282282 fdSnd = FileDescription {party = SFSender , size = FileSize encSize, digest = FileDigest digest, key, nonce, chunkSize = FileSize defChunkSize, chunks = [] , redirect = Nothing }
283- logInfo $ " encrypted file to " <> tshow encPath
283+ logDebug $ " encrypted file to " <> tshow encPath
284284 pure (encPath, fdRcv, fdSnd, chunkSpecs, encSize)
285285 uploadFile :: TVar ChaChaDRG -> [XFTPChunkSpec ] -> TVar [Int64 ] -> Int64 -> ExceptT CLIError IO [SentFileChunk ]
286286 uploadFile g chunks uploadedChunks encSize = do
@@ -293,22 +293,22 @@ cliSendFileOpts SendOptions {filePath, outputDir, numRecipients, xftpServers, re
293293 -- TODO shuffle/unshuffle chunks
294294 -- the reason we don't do pooled downloads here within one server is that http2 library doesn't handle cleint concurrency, even though
295295 -- upload doesn't allow other requests within the same client until complete (but download does allow).
296- logInfo $ " uploading " <> tshow (length chunks) <> " chunks..."
296+ logDebug $ " uploading " <> tshow (length chunks) <> " chunks..."
297297 (errs, rs) <- partitionEithers . concat <$> liftIO (pooledForConcurrentlyN 16 chunks' . mapM $ runExceptT . uploadFileChunk a)
298298 mapM_ throwE errs
299299 pure $ map snd (sortOn fst rs)
300300 where
301301 uploadFileChunk :: XFTPClientAgent -> (Int , XFTPChunkSpec , XFTPServerWithAuth ) -> ExceptT CLIError IO (Int , SentFileChunk )
302302 uploadFileChunk a (chunkNo, chunkSpec@ XFTPChunkSpec {chunkSize}, ProtoServerWithAuth xftpServer auth) = do
303- logInfo $ " uploading chunk " <> tshow chunkNo <> " to " <> showServer xftpServer <> " ..."
303+ logDebug $ " uploading chunk " <> tshow chunkNo <> " to " <> showServer xftpServer <> " ..."
304304 (sndKey, spKey) <- atomically $ C. generateAuthKeyPair C. SEd25519 g
305305 rKeys <- atomically $ L. fromList <$> replicateM numRecipients (C. generateAuthKeyPair C. SEd25519 g)
306306 digest <- liftIO $ getChunkDigest chunkSpec
307307 let ch = FileInfo {sndKey, size = chunkSize, digest}
308308 c <- withRetry retryCount $ getXFTPServerClient a xftpServer
309309 (sndId, rIds) <- withRetry retryCount $ createXFTPChunk c spKey ch (L. map fst rKeys) auth
310310 withReconnect a xftpServer retryCount $ \ c' -> uploadXFTPChunk c' spKey sndId chunkSpec
311- logInfo $ " uploaded chunk " <> tshow chunkNo
311+ logDebug $ " uploaded chunk " <> tshow chunkNo
312312 uploaded <- atomically . stateTVar uploadedChunks $ \ cs ->
313313 let cs' = fromIntegral chunkSize : cs in (sum cs', cs')
314314 liftIO $ do
@@ -418,11 +418,11 @@ cliReceiveFile ReceiveOptions {fileDescription, filePath, retryCount, tempPath,
418418 downloadFileChunk :: TVar ChaChaDRG -> XFTPClientAgent -> FilePath -> FileSize Int64 -> TVar [Int64 ] -> FileChunk -> ExceptT CLIError IO (Int , FilePath )
419419 downloadFileChunk g a encPath (FileSize encSize) downloadedChunks FileChunk {chunkNo, chunkSize, digest, replicas = replica : _} = do
420420 let FileChunkReplica {server, replicaId, replicaKey} = replica
421- logInfo $ " downloading chunk " <> tshow chunkNo <> " from " <> showServer server <> " ..."
421+ logDebug $ " downloading chunk " <> tshow chunkNo <> " from " <> showServer server <> " ..."
422422 chunkPath <- uniqueCombine encPath $ show chunkNo
423423 let chunkSpec = XFTPRcvChunkSpec chunkPath (unFileSize chunkSize) (unFileDigest digest)
424424 withReconnect a server retryCount $ \ c -> downloadXFTPChunk g c replicaKey (unChunkReplicaId replicaId) chunkSpec
425- logInfo $ " downloaded chunk " <> tshow chunkNo <> " to " <> T. pack chunkPath
425+ logDebug $ " downloaded chunk " <> tshow chunkNo <> " to " <> T. pack chunkPath
426426 downloaded <- atomically . stateTVar downloadedChunks $ \ cs ->
427427 let cs' = fromIntegral (unFileSize chunkSize) : cs in (sum cs', cs')
428428 liftIO $ do
@@ -467,7 +467,7 @@ cliDeleteFile DeleteOptions {fileDescription, retryCount, yes} = do
467467 deleteFileChunk a FileChunk {chunkNo, replicas = replica : _} = do
468468 let FileChunkReplica {server, replicaId, replicaKey} = replica
469469 withReconnect a server retryCount $ \ c -> deleteXFTPChunk c replicaKey (unChunkReplicaId replicaId)
470- logInfo $ " deleted chunk " <> tshow chunkNo <> " from " <> showServer server
470+ logDebug $ " deleted chunk " <> tshow chunkNo <> " from " <> showServer server
471471 deleteFileChunk _ _ = throwE $ CLIError " chunk has no replicas"
472472
473473cliFileDescrInfo :: InfoOptions -> ExceptT CLIError IO ()
0 commit comments