Skip to content

Commit

Permalink
added more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Nov 19, 2021
1 parent 3bfef73 commit 146589b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/gdu/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"runtime"
"strings"

log "github.com/sirupsen/logrus"

Expand Down Expand Up @@ -92,6 +93,8 @@ func (a *App) Run() (err error) {
}()
log.SetOutput(f)

log.Printf("Runtime flags: %+v", *a.Flags)

path := a.getPath()
ui, err = a.createUI()
if err != nil {
Expand Down Expand Up @@ -203,6 +206,7 @@ func (a *App) setNoCross(path string) error {
return fmt.Errorf("loading mount points: %w", err)
}
paths := device.GetNestedMountpointsPaths(path, mounts)
log.Printf("Ignoring mount points: %s", strings.Join(paths, ", "))
a.Flags.IgnoreDirs = append(a.Flags.IgnoreDirs, paths...)
}
return nil
Expand Down Expand Up @@ -240,6 +244,7 @@ func (a *App) runAction(ui UI, path string) error {
return err
}

log.Printf("Analyzing path: %s", abspath)
if err := ui.AnalyzePath(abspath, nil); err != nil {
return fmt.Errorf("scanning dir: %w", err)
}
Expand Down

0 comments on commit 146589b

Please sign in to comment.