Use the slog package and provide command-line argument to control log level

This commit is contained in:
Michael Hohn
2024-08-19 16:02:17 -07:00
committed by =Michael Hohn
parent c9dbba5014
commit e5016b2c9b
3 changed files with 74 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ import (
"fmt"
"io"
"log"
"log/slog"
"os"
"os/exec"
"path/filepath"
@@ -591,7 +592,7 @@ func downloadArtifact(url string, task models.DownloadTask) error {
if len(downloadedFiles) == 0 {
return errors.New("No results files found in artifact")
} else {
fmt.Println("Downloaded", downloadedFiles)
slog.Info("Downloaded", downloadedFiles)
return nil
}
}