Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We used to drop gather info logs. Watch the gather process and log the gather logs as they are written to stderr. Example logs with this change: % drenv gather envs/regional-dr.yaml 2025-01-14 14:28:57,539 INFO [rdr] Gathering environment 2025-01-14 14:28:57,787 INFO [rdr] 2025-01-14T14:28:57.786+0200 INFO gather Using kubeconfig "/Users/nir/.kube/config" 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Gathering from all namespaces 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Using all addons 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Storing data in "gather.20250114142857" 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Gathering from cluster "dr1" 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Gathering from cluster "dr2" 2025-01-14 14:28:57,789 INFO [rdr] 2025-01-14T14:28:57.789+0200 INFO gather Gathering from cluster "hub" 2025-01-14 14:28:59,082 INFO [rdr] 2025-01-14T14:28:59.082+0200 INFO gather Gathered 1551 resources from cluster "hub" in 1.293 seconds 2025-01-14 14:29:06,687 INFO [rdr] 2025-01-14T14:29:06.687+0200 INFO gather Gathered 1992 resources from cluster "dr2" in 8.899 seconds 2025-01-14 14:29:08,989 INFO [rdr] 2025-01-14T14:29:08.989+0200 INFO gather Gathered 1982 resources from cluster "dr1" in 11.200 seconds 2025-01-14 14:29:08,989 INFO [rdr] 2025-01-14T14:29:08.989+0200 INFO gather Gathered 5525 resources from 3 clusters in 11.200 seconds 2025-01-14 14:29:08,996 INFO [rdr] Environment gathered in 11.46 seconds Issues: - Gather logs include duplicate timestamps and log level names. We will improve this later by adding json logs to kubectl gather, similar to lima. Signed-off-by: Nir Soffer <[email protected]>
- Loading branch information