Skip to content

Commit

Permalink
fix: timestamp and level filter fix for logs (#2374)
Browse files Browse the repository at this point in the history
Signed-off-by: veds-g <[email protected]>
  • Loading branch information
veds-g committed Feb 18, 2025
1 parent 8ced82d commit ce5ff7a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 93 deletions.
9 changes: 5 additions & 4 deletions server/apis/v1/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,10 +924,11 @@ func (h *handler) PodLogs(c *gin.Context) {
// parse the query parameters
tailLines := h.parseTailLines(c.Query("tailLines"))
logOptions := &corev1.PodLogOptions{
Container: c.Query("container"),
Follow: c.Query("follow") == "true",
TailLines: tailLines,
Previous: c.Query("previous") == "true",
Container: c.Query("container"),
Follow: c.Query("follow") == "true",
TailLines: tailLines,
Timestamps: true,
Previous: c.Query("previous") == "true",
}

stream, err := h.kubeClient.CoreV1().Pods(ns).GetLogs(pod, logOptions).Stream(c)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce5ff7a

Please sign in to comment.