Suppress "Transfer" event messages (#64)

* [aws-api] remove transfer events

* [changelog] updated
This commit is contained in:
Paul Campbell 2019-06-14 20:18:05 +01:00 committed by GitHub
parent 0b60d52db5
commit 03227a3720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View file

@ -11,6 +11,10 @@ The format is based on [[https://keepachangelog.com/en/1.0.0/][Keep a Changelog]
- ~-d~, ~--debug~ flag for log messages - ~-d~, ~--debug~ flag for log messages
** Changed
- Suppress Transfer event messages
* [0.4.0] - 2019-06-11 * [0.4.0] - 2019-06-11
** Added ** Added

View file

@ -10,10 +10,9 @@ class UploadProgressListener(localFile: LocalFile)
def listener: UploadEvent => Unit = def listener: UploadEvent => Unit =
{ {
case e: TransferEvent => logTransfer(localFile, e)
case e: RequestEvent => case e: RequestEvent =>
bytesTransferred += e.transferred bytesTransferred += e.transferred
logRequestCycle(localFile, e, bytesTransferred) logRequestCycle(localFile, e, bytesTransferred)
case e: ByteTransferEvent => logByteTransfer(e) case _ => ()
} }
} }

View file

@ -9,10 +9,6 @@ import scala.io.AnsiColor._
trait UploadProgressLogging { trait UploadProgressLogging {
def logTransfer(localFile: LocalFile,
event: TransferEvent): Unit =
println(s"Transfer:${event.name}: ${localFile.remoteKey.key}")
private val oneHundredPercent = 100 private val oneHundredPercent = 100
def logRequestCycle(localFile: LocalFile, def logRequestCycle(localFile: LocalFile,
@ -33,7 +29,4 @@ trait UploadProgressLogging {
print(clearLine) print(clearLine)
} }
def logByteTransfer(event: ByteTransferEvent): Unit =
print(".")
} }