Skip to content

Commit

Permalink
AddSource for launcher subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Feb 26, 2024
1 parent 30059f7 commit 1bb3e7d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cmd/launcher/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func runDoctor(args []string) error {
}

slogger := multislogger.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slogLevel,
Level: slogLevel,
AddSource: true,
})).Logger

flagController := flags.NewFlagController(slogger, nil, fcOpts...)
Expand Down
3 changes: 2 additions & 1 deletion cmd/launcher/flare.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ func runFlare(args []string) error {
}

slogger := multislogger.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slogLevel,
Level: slogLevel,
AddSource: true,
})).Logger

fcOpts := []flags.Option{flags.WithCmdLineOpts(opts)}
Expand Down
3 changes: 2 additions & 1 deletion cmd/launcher/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func runInteractive(args []string) error {
}

slogger := multislogger.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
Level: slogLevel,
Level: slogLevel,
AddSource: true,
})).Logger

osquerydPath := *flOsquerydPath
Expand Down
3 changes: 2 additions & 1 deletion cmd/launcher/run_compactdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ func runCompactDb(args []string) error {
}

slogger := multislogger.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slogLevel,
Level: slogLevel,
AddSource: true,
})).Logger

boltPath := filepath.Join(opts.RootDirectory, "launcher.db")
Expand Down
3 changes: 2 additions & 1 deletion cmd/launcher/run_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ func runSocket(args []string) error {
return err
}
slogger := multislogger.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
Level: slog.LevelDebug,
AddSource: true,
})).Logger
fcOpts := []flags.Option{flags.WithCmdLineOpts(cmdlineopts)}
flagController := flags.NewFlagController(slogger, inmemory.NewStore(), fcOpts...)
Expand Down

0 comments on commit 1bb3e7d

Please sign in to comment.