From 2ff5d68b4f59c6fe5f86856234d965be43d2a6c5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 24 May 2019 08:00:04 +0100 Subject: [PATCH] [Sync] Log when starting to scan local files --- src/main/scala/net/kemitix/s3thorp/Sync.scala | 1 + src/main/scala/net/kemitix/s3thorp/SyncLogging.scala | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/main/scala/net/kemitix/s3thorp/Sync.scala b/src/main/scala/net/kemitix/s3thorp/Sync.scala index 101fc37..6c06adf 100644 --- a/src/main/scala/net/kemitix/s3thorp/Sync.scala +++ b/src/main/scala/net/kemitix/s3thorp/Sync.scala @@ -15,6 +15,7 @@ class Sync(s3Client: S3Client) logRunStart listObjects(c.bucket, c.prefix) .map { implicit s3ObjectsData => { + logFileScan val actions = for { file <- findFiles(c.source) data <- getMetadata(file) diff --git a/src/main/scala/net/kemitix/s3thorp/SyncLogging.scala b/src/main/scala/net/kemitix/s3thorp/SyncLogging.scala index aeec426..695ba0e 100644 --- a/src/main/scala/net/kemitix/s3thorp/SyncLogging.scala +++ b/src/main/scala/net/kemitix/s3thorp/SyncLogging.scala @@ -9,6 +9,9 @@ trait SyncLogging extends Logging { log1(s"Bucket: ${c.bucket.name}, Prefix: ${c.prefix.key}, Source: ${c.source}, " + s"Filter: ${c.filters.map{f => f.filter}.mkString(""", """)}")(c) + def logFileScan(implicit c: Config): Unit = + log1(s"Scanning local files: ${c.source}...") + def logRunFinished(actions: List[S3Action]) (implicit c: Config): Unit = {