[s3uploader] simplify logging
This commit is contained in:
parent
b61499ed8f
commit
be266e0d41
1 changed files with 5 additions and 5 deletions
|
@ -13,13 +13,13 @@ trait S3Uploader
|
||||||
|
|
||||||
def performUpload(c: Config): File => Stream[IO, Unit] = {
|
def performUpload(c: Config): File => Stream[IO, Unit] = {
|
||||||
val remoteKey = generateKey(c) _
|
val remoteKey = generateKey(c) _
|
||||||
file =>
|
file => {
|
||||||
|
val key = remoteKey(file)
|
||||||
|
val shortFile = c.source.toPath.relativize(file.toPath)
|
||||||
Stream.eval(for {
|
Stream.eval(for {
|
||||||
_ <- putStrLn(s"uploading: $file")
|
_ <- putStrLn(s"Uploading: $shortFile")
|
||||||
key = remoteKey(file)
|
|
||||||
_ <- upload(file, c.bucket, key)
|
_ <- upload(file, c.bucket, key)
|
||||||
_ <- putStrLn(s"uploaded: ${c.bucket}/$key")
|
|
||||||
} yield ())
|
} yield ())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue