print location of log file (#2343)

## Does this PR need a docs update or release note?

- [x]  No 

## Type of change

- [x] 🧹 Tech Debt/Cleanup

## Issue(s)

* #2329

## Test Plan

- [x] 💪 Manual
This commit is contained in:
Keepers 2023-01-31 18:47:49 -07:00 committed by GitHub
parent b5b4576393
commit 4ac81e6253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import (
"time"
"github.com/alcionai/clues"
"github.com/alcionai/corso/src/cli/print"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"go.uber.org/zap"
@ -118,6 +119,7 @@ func PreloadLoggingFlags() (string, string) {
if logfile != "stdout" && logfile != "stderr" {
logdir := filepath.Dir(logfile)
print.Info(context.Background(), "Logging to file: "+logfile)
err := os.MkdirAll(logdir, 0o755)
if err != nil {