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:
parent
b5b4576393
commit
4ac81e6253
@ -7,6 +7,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
|
"github.com/alcionai/corso/src/cli/print"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@ -118,6 +119,7 @@ func PreloadLoggingFlags() (string, string) {
|
|||||||
|
|
||||||
if logfile != "stdout" && logfile != "stderr" {
|
if logfile != "stdout" && logfile != "stderr" {
|
||||||
logdir := filepath.Dir(logfile)
|
logdir := filepath.Dir(logfile)
|
||||||
|
print.Info(context.Background(), "Logging to file: "+logfile)
|
||||||
|
|
||||||
err := os.MkdirAll(logdir, 0o755)
|
err := os.MkdirAll(logdir, 0o755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user