Update logging behavior
This commit is contained in:
parent
3b78b06fff
commit
6f1ba24761
28 changed files with 176 additions and 137 deletions
|
|
@ -2,10 +2,11 @@ package exporter
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
|
||||
)
|
||||
|
||||
// ShouldPrune determines if a file with the provided modification time should be
|
||||
|
|
@ -43,7 +44,7 @@ func (exporter *Exporter) PruneExports(ctx context.Context, progress io.Writer)
|
|||
|
||||
// assemble path, and then remove the file!
|
||||
path := filepath.Join(sPath, entry.Name())
|
||||
fmt.Fprintf(progress, "Removing %s cause it is older than %d days\n", path, exporter.Config.MaxBackupAge)
|
||||
logging.ProgressF(progress, ctx, "Removing %s cause it is older than %d days\n", path, exporter.Config.MaxBackupAge)
|
||||
|
||||
if err := exporter.Still.Environment.Remove(path); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue