Skip to content

Commit

Permalink
issue 173: log current directory and abs(dataDir) during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyen committed Aug 26, 2015
1 parent 36d5367 commit e878a7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmd/cbft/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"os"
"os/signal"
"path"
"path/filepath"
"runtime"
"runtime/pprof"
"strings"
Expand Down Expand Up @@ -104,6 +105,20 @@ func main() {
}
}

wd, err := os.Getwd()
if err != nil {
log.Fatalf("main: os.Getwd, err: %#v", err)
return
}
log.Printf("main: curr dir: %q", wd)

dataDirAbs, err := filepath.Abs(flags.DataDir)
if err != nil {
log.Fatalf("main: filepath.Abs, err: %#v", err)
return
}
log.Printf("main: data dir: %q", dataDirAbs)

// If cfg is down, we error, leaving it to some user-supplied
// outside watchdog to backoff and restart/retry.
cfg, err := cmd.MainCfg("cbft", flags.CfgConnect,
Expand Down

0 comments on commit e878a7a

Please sign in to comment.