Skip to content

Commit

Permalink
remove logrus
Browse files Browse the repository at this point in the history
  • Loading branch information
d80tb7 committed Jan 4, 2025
1 parent 94de1dd commit 4e5450d
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions cmd/armada-load-tester/cmd/loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/armada-load-tester/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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)
}
}
Expand All @@ -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)
}
}
2 changes: 1 addition & 1 deletion cmd/binoculars/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fakeexecutor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cmd/lookoutingesterv2/dbloadtester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/lookoutingesterv2/main.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions cmd/lookoutv2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"os/signal"
"syscall"

log "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"k8s.io/utils/clock"

"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"
Expand Down Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion cmd/scheduler/cmd/migrate_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
9 changes: 4 additions & 5 deletions cmd/simulator/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4e5450d

Please sign in to comment.