Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/cli/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ func execCmd(cmd *cobra.Command, args []string) error {
gpus = "all"
}

// Use human-readable log format for local development
env := make([]string, len(envFlags))
copy(env, envFlags)
env = append(env, "LOG_FORMAT=console")

// Automatically propagate RUST_LOG for Rust coglet debugging
env := envFlags
if rustLog := os.Getenv("RUST_LOG"); rustLog != "" {
env = append(env, "RUST_LOG="+rustLog)
}
Expand Down
6 changes: 5 additions & 1 deletion pkg/cli/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ func cmdServe(cmd *cobra.Command, arg []string) error {
args = append(args, "--upload-url", uploadURL)
}

// Use human-readable log format for local development
env := make([]string, len(envFlags))
copy(env, envFlags)
env = append(env, "LOG_FORMAT=console")

// Automatically propagate RUST_LOG for Rust coglet debugging
env := envFlags
if rustLog := os.Getenv("RUST_LOG"); rustLog != "" {
env = append(env, "RUST_LOG="+rustLog)
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/predict/predictor.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ type Predictor struct {
}

func NewPredictor(ctx context.Context, runOptions command.RunOptions, isTrain bool, dockerCommand command.Command) (*Predictor, error) {
// Use human-readable log format for local development
runOptions.Env = append(runOptions.Env, "LOG_FORMAT=console")
Comment thread
markphelps marked this conversation as resolved.
Outdated

if global.Debug {
runOptions.Env = append(runOptions.Env, "COG_LOG_LEVEL=debug")
} else {
Expand Down
Loading