Switch to global log variable

This commit is contained in:
Elara 2022-11-30 10:00:50 -08:00
parent 6013bdf8b9
commit 01a9f23a64
8 changed files with 11 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import (
"github.com/goreleaser/nfpm/v2"
"github.com/goreleaser/nfpm/v2/files"
"go.arsenm.dev/logger/log"
"go.arsenm.dev/lure/distro"
"go.arsenm.dev/lure/download"
"go.arsenm.dev/lure/internal/cpu"

View File

@ -23,6 +23,7 @@ import (
"path/filepath"
"github.com/pelletier/go-toml/v2"
"go.arsenm.dev/logger/log"
"go.arsenm.dev/lure/manager"
)

View File

@ -19,6 +19,7 @@
package main
import (
"go.arsenm.dev/logger/log"
"os"
"github.com/urfave/cli/v2"

View File

@ -20,6 +20,7 @@ package main
import (
"context"
"go.arsenm.dev/logger/log"
"github.com/urfave/cli/v2"
"go.arsenm.dev/lure/manager"

View File

@ -22,6 +22,7 @@ import (
"fmt"
"github.com/urfave/cli/v2"
"go.arsenm.dev/logger/log"
"go.arsenm.dev/lure/distro"
)

View File

@ -27,9 +27,12 @@ import (
"github.com/urfave/cli/v2"
"go.arsenm.dev/logger"
"go.arsenm.dev/logger/log"
)
var log = logger.NewPretty(os.Stderr)
func init() {
log.Logger = logger.NewPretty(os.Stderr)
}
func main() {
ctx := context.Background()

View File

@ -29,6 +29,7 @@ import (
"github.com/go-git/go-git/v5"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"go.arsenm.dev/logger/log"
"go.arsenm.dev/lure/download"
"golang.org/x/exp/slices"
)

View File

@ -23,6 +23,7 @@ import (
"fmt"
"github.com/urfave/cli/v2"
"go.arsenm.dev/logger/log"
"go.arsenm.dev/lure/distro"
"go.arsenm.dev/lure/manager"
)