mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test(cli): Improve speedtest debugging (#6341)
This commit is contained in:
+4
-1
@@ -51,7 +51,10 @@ func speedtest() *cobra.Command {
|
||||
if err != nil && !xerrors.Is(err, cliui.AgentStartError) {
|
||||
return xerrors.Errorf("await agent: %w", err)
|
||||
}
|
||||
logger := slog.Make(sloghuman.Sink(cmd.ErrOrStderr()))
|
||||
logger, ok := LoggerFromContext(ctx)
|
||||
if !ok {
|
||||
logger = slog.Make(sloghuman.Sink(cmd.ErrOrStderr()))
|
||||
}
|
||||
if cliflag.IsSetBool(cmd, varVerbose) {
|
||||
logger = logger.Leveled(slog.LevelDebug)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user