in ecr-login/config/log.go [29:48]
func logrusConfig() {
logdir, err := homedir.Expand(GetCacheDir() + "/log")
if err != nil {
fmt.Fprintf(os.Stderr, "log: failed to find directory: %v", err)
logdir = os.TempDir()
}
// Clean the path to replace with OS-specific separators
logdir = filepath.Clean(logdir)
err = os.MkdirAll(logdir, os.ModeDir|0700)
if err != nil {
fmt.Fprintf(os.Stderr, "log: failed to create directory: %v", err)
logdir = os.TempDir()
}
file, err := os.OpenFile(filepath.Join(logdir, "ecr-login.log"), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0664)
if err != nil {
return
}
logrus.SetLevel(logrus.DebugLevel)
logrus.SetOutput(file)
}