Fixed twice display of "Logging to file" line (#2438)
## Description Issue - https://github.com/alcionai/corso/issues/2404 Fixed display of redundant messages. ## Does this PR need a docs update or release note? - [x] ⛔ No ## Type of change - [x] 🐛 Bugfix ## Issue(s) * https://github.com/alcionai/corso/issues/2404 ## Test Plan - [ ] 💪 Manual
This commit is contained in:
parent
a4b50a1ec0
commit
adbe85b47f
@ -11,8 +11,6 @@ import (
|
|||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
|
|
||||||
"github.com/alcionai/corso/src/cli/print"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Default location for writing logs, initialized in platform specific files
|
// Default location for writing logs, initialized in platform specific files
|
||||||
@ -123,7 +121,6 @@ func PreloadLoggingFlags() (string, string) {
|
|||||||
if logfile != "stdout" && logfile != "stderr" {
|
if logfile != "stdout" && logfile != "stderr" {
|
||||||
LogFile = logfile
|
LogFile = logfile
|
||||||
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