diff --git a/cmd/armada-load-tester/cmd/loadtest.go b/cmd/armada-load-tester/cmd/loadtest.go index 5a2e301490e..f6c09622bcd 100644 --- a/cmd/armada-load-tester/cmd/loadtest.go +++ b/cmd/armada-load-tester/cmd/loadtest.go @@ -6,10 +6,10 @@ import ( "strings" "time" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/viper" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/pkg/client" "github.com/armadaproject/armada/pkg/client/domain" "github.com/armadaproject/armada/pkg/client/util" @@ -72,7 +72,7 @@ var loadtestCmd = &cobra.Command{ loadTestSpec := &domain.LoadTestSpecification{} err := util.BindJsonOrYaml(filePath, loadTestSpec) if err != nil { - log.Error(err) + log.Error(err.Error()) os.Exit(1) } diff --git a/cmd/armada-load-tester/cmd/root.go b/cmd/armada-load-tester/cmd/root.go index 5f2bcfb59c3..0803042410d 100644 --- a/cmd/armada-load-tester/cmd/root.go +++ b/cmd/armada-load-tester/cmd/root.go @@ -3,9 +3,9 @@ package cmd import ( "os" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/pkg/client" ) @@ -28,7 +28,7 @@ The location of this file can be passed in using --config argument or picked fro // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { if err := rootCmd.Execute(); err != nil { - log.Error(err) + log.Error(err.Error()) os.Exit(1) } } @@ -37,7 +37,7 @@ var cfgFile string func initConfig() { if err := client.LoadCommandlineArgsFromConfigFile(cfgFile); err != nil { - log.Error(err) + log.Error(err.Error()) os.Exit(1) } } diff --git a/cmd/binoculars/main.go b/cmd/binoculars/main.go index 86389fbc91b..5c0558aeb3a 100644 --- a/cmd/binoculars/main.go +++ b/cmd/binoculars/main.go @@ -8,7 +8,6 @@ import ( "syscall" "github.com/grpc-ecosystem/grpc-gateway/runtime" - log "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" "google.golang.org/grpc" @@ -19,6 +18,7 @@ import ( "github.com/armadaproject/armada/internal/common/armadacontext" gateway "github.com/armadaproject/armada/internal/common/grpc" "github.com/armadaproject/armada/internal/common/health" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/common/profiling" api "github.com/armadaproject/armada/pkg/api/binoculars" ) diff --git a/cmd/fakeexecutor/main.go b/cmd/fakeexecutor/main.go index d24ffce0e62..69d9ce03c33 100644 --- a/cmd/fakeexecutor/main.go +++ b/cmd/fakeexecutor/main.go @@ -5,12 +5,12 @@ import ( "os/signal" "syscall" - log "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/armadacontext" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/common/profiling" "github.com/armadaproject/armada/internal/executor/configuration" "github.com/armadaproject/armada/internal/executor/fake" diff --git a/cmd/lookoutingesterv2/dbloadtester/main.go b/cmd/lookoutingesterv2/dbloadtester/main.go index 8daf0960f2f..87f91fa1f73 100644 --- a/cmd/lookoutingesterv2/dbloadtester/main.go +++ b/cmd/lookoutingesterv2/dbloadtester/main.go @@ -4,13 +4,13 @@ import ( "fmt" "time" - log "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" "sigs.k8s.io/yaml" "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/app" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/lookoutingesterv2/configuration" "github.com/armadaproject/armada/internal/lookoutingesterv2/dbloadtester" ) diff --git a/cmd/lookoutingesterv2/main.go b/cmd/lookoutingesterv2/main.go index b60e58f6241..a0e48a6374f 100644 --- a/cmd/lookoutingesterv2/main.go +++ b/cmd/lookoutingesterv2/main.go @@ -1,11 +1,11 @@ package main import ( - log "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/armadaproject/armada/internal/common" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/lookoutingesterv2" "github.com/armadaproject/armada/internal/lookoutingesterv2/benchmark" "github.com/armadaproject/armada/internal/lookoutingesterv2/configuration" diff --git a/cmd/lookoutv2/main.go b/cmd/lookoutv2/main.go index 48d48bc97b5..825b939d904 100644 --- a/cmd/lookoutv2/main.go +++ b/cmd/lookoutv2/main.go @@ -5,7 +5,6 @@ import ( "os/signal" "syscall" - log "github.com/sirupsen/logrus" "github.com/spf13/pflag" "github.com/spf13/viper" "k8s.io/utils/clock" @@ -13,6 +12,7 @@ import ( "github.com/armadaproject/armada/internal/common" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/database" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/common/profiling" "github.com/armadaproject/armada/internal/lookoutv2" "github.com/armadaproject/armada/internal/lookoutv2/configuration" @@ -148,7 +148,7 @@ func main() { restapi.UIConfig = config.UIConfig if err := lookoutv2.Serve(config); err != nil { - log.Error(err) + log.Error(err.Error()) os.Exit(1) } } diff --git a/cmd/scheduler/cmd/migrate_database.go b/cmd/scheduler/cmd/migrate_database.go index 9e48f5fba5f..407048e31dc 100644 --- a/cmd/scheduler/cmd/migrate_database.go +++ b/cmd/scheduler/cmd/migrate_database.go @@ -4,11 +4,11 @@ import ( "time" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/armadaproject/armada/internal/common/armadacontext" "github.com/armadaproject/armada/internal/common/database" + log "github.com/armadaproject/armada/internal/common/logging" schedulerdb "github.com/armadaproject/armada/internal/scheduler/database" ) diff --git a/cmd/simulator/cmd/root.go b/cmd/simulator/cmd/root.go index a1c815633c5..1e758e23afb 100644 --- a/cmd/simulator/cmd/root.go +++ b/cmd/simulator/cmd/root.go @@ -6,13 +6,12 @@ import ( "runtime/pprof" "time" - "github.com/armadaproject/armada/internal/scheduler/simulator/sink" - - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/armadaproject/armada/internal/common/armadacontext" + log "github.com/armadaproject/armada/internal/common/logging" "github.com/armadaproject/armada/internal/scheduler/simulator" + "github.com/armadaproject/armada/internal/scheduler/simulator/sink" "github.com/armadaproject/armada/internal/scheduler/testfixtures" ) @@ -139,11 +138,11 @@ func runSimulations(cmd *cobra.Command, args []string) error { log.Infof("Will write profiling information to %s", profilingFile) f, err := os.Create(profilingFile) if err != nil { - log.Fatal(err) + log.Fatal(err.Error()) } err = pprof.StartCPUProfile(f) if err != nil { - log.Fatal(err) + log.Fatal(err.Error()) } defer pprof.StopCPUProfile() } diff --git a/go.mod b/go.mod index 3de4bb169da..776a0d75590 100644 --- a/go.mod +++ b/go.mod @@ -80,7 +80,6 @@ require ( github.com/redis/go-redis/extra/redisprometheus/v9 v9.0.5 github.com/redis/go-redis/v9 v9.7.0 github.com/segmentio/fasthash v1.0.3 - github.com/sirupsen/logrus v1.9.3 github.com/xitongsys/parquet-go v1.6.2 go.uber.org/mock v0.5.0 go.uber.org/zap v1.27.0 @@ -183,6 +182,7 @@ require ( github.com/rivo/uniseg v0.4.2 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.11.0 // indirect