From 817e06dd64c06f51d8f066ce92bd65870da72b8a Mon Sep 17 00:00:00 2001 From: Lidia Mokevnina Date: Tue, 8 Nov 2022 18:02:40 +0100 Subject: [PATCH 1/3] added timestamps option to logs --- internal/clients/kuber/pods.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/clients/kuber/pods.go b/internal/clients/kuber/pods.go index e6b6fc06..e56bd0fd 100644 --- a/internal/clients/kuber/pods.go +++ b/internal/clients/kuber/pods.go @@ -37,6 +37,7 @@ func (client *Client) GetPodLogs( Container: containerName, TailLines: &limit, Previous: previous, + Timestamps: true, } request := client.clientset.CoreV1().Pods(namespace).GetLogs(podName, logOptions) From a7ec346f43c73470584a29fb46656029468a1a19 Mon Sep 17 00:00:00 2001 From: Lidia Mokevnina Date: Wed, 9 Nov 2022 19:49:24 +0100 Subject: [PATCH 2/3] [47] added the previous option to container logs --- internal/clients/kuber/pods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/clients/kuber/pods.go b/internal/clients/kuber/pods.go index e56bd0fd..7c0beee0 100644 --- a/internal/clients/kuber/pods.go +++ b/internal/clients/kuber/pods.go @@ -34,10 +34,10 @@ func (client *Client) GetPodLogs( previous bool, ) ([]string, error) { logOptions := &v1.PodLogOptions{ + Timestamps: true, Container: containerName, TailLines: &limit, Previous: previous, - Timestamps: true, } request := client.clientset.CoreV1().Pods(namespace).GetLogs(podName, logOptions) From 3df43f29d93a20f65a6909affbd3a3db9f79d82f Mon Sep 17 00:00:00 2001 From: Lidia Mokevnina Date: Tue, 8 Nov 2022 18:02:40 +0100 Subject: [PATCH 3/3] added timestamps option to logs --- internal/clients/kuber/pods.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/clients/kuber/pods.go b/internal/clients/kuber/pods.go index 7c0beee0..f98eb575 100644 --- a/internal/clients/kuber/pods.go +++ b/internal/clients/kuber/pods.go @@ -34,10 +34,10 @@ func (client *Client) GetPodLogs( previous bool, ) ([]string, error) { logOptions := &v1.PodLogOptions{ - Timestamps: true, - Container: containerName, - TailLines: &limit, - Previous: previous, + Previous: previous, + Container: containerName, + TailLines: &limit, + Timestamps: true, } request := client.clientset.CoreV1().Pods(namespace).GetLogs(podName, logOptions)