From c015b5f1daa60e7bda4df9e84023c87e4a92656f Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sun, 25 Feb 2018 14:46:20 -0800 Subject: [PATCH] Fix -nologs on linx-cleanup tool (closes #136) --- linx-cleanup/cleanup.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linx-cleanup/cleanup.go b/linx-cleanup/cleanup.go index a8dc37f..9ea89ae 100644 --- a/linx-cleanup/cleanup.go +++ b/linx-cleanup/cleanup.go @@ -34,11 +34,15 @@ func main() { for _, filename := range files { metadata, err := metaBackend.Get(filename) if err != nil { - log.Printf("Failed to find metadata for %s", filename) + if !noLogs { + log.Printf("Failed to find metadata for %s", filename) + } } if expiry.IsTsExpired(metadata.Expiry) { - log.Printf("Delete %s", filename) + if !noLogs { + log.Printf("Delete %s", filename) + } fileBackend.Delete(filename) metaStorageBackend.Delete(filename) }