Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions runner/internal/api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ func JSONResponseHandler(handler func(http.ResponseWriter, *http.Request) (inter
if errors.As(err, &apiErr) {
status = apiErr.Status
errMsg = apiErr.Error()
log.Warning(r.Context(), "API error", "err", errMsg, "status", status)
log.Warning(r.Context(), "API error", "err", errMsg, "method", r.Method, "endpoint", r.URL.Path, "status", status)
} else {
status = http.StatusInternalServerError
log.Error(r.Context(), "Unexpected API error", "err", err, "status", status)
log.Error(r.Context(), "Unexpected API error", "err", err, "method", r.Method, "endpoint", r.URL.Path, "status", status)
}
} else {
log.Trace(r.Context(), "", "method", r.Method, "endpoint", r.URL.Path, "status", status)
}

if status != 500 && body != nil {
Expand All @@ -127,7 +129,5 @@ func JSONResponseHandler(handler func(http.ResponseWriter, *http.Request) (inter
} else {
http.Error(w, errMsg, status)
}

log.Debug(r.Context(), "", "method", r.Method, "endpoint", r.URL.Path, "status", status)
}
}
2 changes: 1 addition & 1 deletion src/dstack/_internal/core/backends/base/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def get_shim_env(
backend_shim_env: Optional[Dict[str, str]] = None,
arch: Optional[str] = None,
) -> Dict[str, str]:
log_level = "6" # Trace
log_level = "5" # Debug
envs = {
"DSTACK_SHIM_HOME": get_dstack_working_dir(base_path),
"DSTACK_SHIM_HTTP_PORT": str(DSTACK_SHIM_HTTP_PORT),
Expand Down