Suppress "Transfer" event messages (#64)
* [aws-api] remove transfer events * [changelog] updated
This commit is contained in:
parent
0b60d52db5
commit
03227a3720
3 changed files with 5 additions and 9 deletions
|
@ -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
|
||||||
|
|
|
@ -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 _ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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(".")
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue