{"full_name":"stern/stern","owner":"stern","name":"stern","shard":"1","url":"https://github.com/stern/stern","description":"⎈ Multi pod and container log tailing for Kubernetes","homepage":"","topics":["kubernetes","logs","logging","devops","debugging","tail"],"tag_pages":["debugging","devops","kubernetes","logging","logs"],"language":"Go","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/73174029?v=4","created_at":"2020-10-21T12:14:48Z","pushed_at":"2026-11-15T11:57:03Z","metrics":{"stars":4924,"forks":181,"watchers":24,"issues":167,"prs":226,"releases":28,"issues_open":26,"issues_closed":141,"prs_open":4,"prs_closed":12,"prs_merged":210,"discussions":20},"growth":{"day":{"stars":2,"forks":0,"base_day":"2026-11-15"}},"history":{"dates":["2026-11-10","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[4919,4922,4922,4922,4922,4922,4924],"forks":[181,181,181,181,181,181,181],"watchers":[null,24,24,24,24,24,24],"issues_open":[null,26,26,26,26,26,26],"prs_open":[null,3,3,3,4,6,4]},"boards":{},"same_owner":[],"issues":[{"number":140,"title":"Windows + WSL : text does not go to next line","comments":14,"created_at":"2021-07-05T09:24:10Z"},{"number":312,"title":"Logs are not printing .. seems to be stuck","comments":6,"created_at":"2024-08-03T15:36:44Z"},{"number":29,"title":"Tail logs for a specified duration","comments":6,"created_at":"2020-10-22T02:00:05Z"},{"number":12,"title":"color not working on Windows PowerShell","comments":5,"created_at":"2020-10-22T01:59:47Z"},{"number":323,"title":"ppextjson is not available in templates","comments":4,"created_at":"2024-11-18T11:45:17Z"},{"number":95,"title":"Need the official cool stern logo","comments":4,"created_at":"2020-11-06T08:22:56Z"},{"number":311,"title":"Stop tailing logs after log rotation in k8s","comments":3,"created_at":"2024-07-25T13:21:25Z"},{"number":361,"title":"Log tailing stops after a few hours for long-running pods","comments":2,"created_at":"2025-12-09T16:47:40Z"}],"discussions":[{"number":377,"title":"An Agent Skill for stern — teaching LLM agents to use it without hanging on --no-follow","comments":0,"category":"Show and tell","created_at":"2026-08-06T09:16:16Z"},{"number":351,"title":"remove reference to wercker/stern in project description","comments":0,"category":"General","created_at":"2025-09-09T17:38:59Z"},{"number":330,"title":"Log freeze","comments":0,"category":"Q&A","created_at":"2024-12-27T21:04:40Z"},{"number":278,"title":"Stern Query Produces No Output: Could it be related to Kubernetes Version?","comments":1,"category":"Q&A","created_at":"2023-09-01T07:45:13Z"},{"number":270,"title":"Only for Kubernetes?","comments":1,"category":"Q&A","created_at":"2023-06-12T04:48:23Z"},{"number":269,"title":"Sort lines by Date","comments":1,"category":"General","created_at":"2023-06-06T06:58:19Z"},{"number":266,"title":"Offline stern installer","comments":1,"category":"General","created_at":"2023-05-04T14:54:16Z"},{"number":202,"title":"Disabling headers","comments":2,"category":"Q&A","created_at":"2022-12-16T15:12:25Z"}],"latest_release":{"name":"v1.35.0","tag":"v1.35.0","published_at":"2026-10-22T13:57:05Z","body":"## :zap: Notable Changes\r\n\r\n### A new `--pager` flag to pipe output into a pager\r\n\r\nYou can now pipe stern's output into a pager with the `--pager` flag. Unlike piping in the shell (`stern --color=always backend | less -R`), colors are preserved without any extra flags, and stern stops tailing when you quit the pager.\r\n\r\n```\r\nstern --pager less backend\r\n```\r\n\r\nThe pager is used only when the standard output is connected to a terminal (tty). If you always want to use a pager, set it in the config file:\r\n\r\n```yaml\r\npager: less\r\n```\r\n\r\n### Distinct colors for pods created by the same workload\r\n\r\nPods created by the same workload (e.g. replicas of a Deployment) are now assigned distinct colors as long as unused colors remain, so that their interleaved logs are easier to tell apart. Pods that do not share a workload with other pods keep the same colors as before.\r\n\r\n### Nested field extraction in `extractJSONParts`\r\n\r\n`extractJSONParts` and `tryExtractJSONParts` now accept keys in dot notation to access nested fields.\r\n\r\n```\r\nstern --template='{{ extractJSONParts .Message \"python.levelname\" \"message\" }}{{\"\\n\"}}' backend\r\n```\r\n\r\n### The timestamp and the namespace in `extjson` and `ppextjson`\r\n\r\nThe `extjson` and `ppextjson` outputs now include the `timestamp` field when `--timestamps` is specified, and the `namespace` field when tailing multiple namespaces with `--namespace`. Nested JSON messages in `ppextjson` are now indented as well.\r\n\r\n```\r\n$ stern --timestamps -o extjson backend\r\n{\"pod\":\"backend-...\",\"container\":\"backend\",\"timestamp\":\"2026-10-01T10:00:00.123456789Z\",\"message\":\"hello\"}\r\n```\r\n\r\n## :warning: Breaking Changes\r\n\r\n### `.Message` no longer includes the timestamp with `--timestamps`\r\n\r\nWith `--timestamps`, the timestamp is no longer prepended to `.Message` in templates, so template functions that parse `.Message` as JSON now work with `--timestamps`. The timestamp is available as the new `.Timestamp` template variable. The output of the built-in `default` and `raw` templates is unchanged, but if you use a custom template with `--timestamps`, add `.Timestamp` to it to keep printing the timestamp.\r\n\r\n```\r\nstern --timestamps --template='{{.Timestamp}} {{.Message}}{{\"\\n\"}}' backend\r\n```\r\n\r\n## Changes\r\n\r\n* fix: close config file after reading ([#367](https://github.com/stern/stern/pull/367)) ee5b0b3 (Filip Boye-Kofi)\r\n* fix: change errorf format to represent real value ([#368](https://github.com/stern/stern/pull/368)) 0d39b3f (Filip Boye-Kofi)\r\n* docs: fix \"when if\" typo in max-log-requests table ([#371](https://github.com/stern/stern/pull/371)) 13b9806 (SEONGHYUN HONG)\r\n* Keep .Message raw with --timestamps; expose timestamp as .Timestamp ([#372](https://github.com/stern/stern/pull/372)) 8a00e61 (SEONGHYUN HONG)\r\n* Support nested field extraction via dot notation in extractJSONParts ([#373](https://github.com/stern/stern/pull/373)) 3dd605b (somaz)\r\n* docs: list toUTC in README template functions ([#378](https://github.com/stern/stern/pull/378)) 2926461 (Dean Chen)\r\n* Fix misspelled identifiers reHightlight and stirngSlice ([#382](https://github.com/stern/stern/pull/382)) 523c01a (MsfPablo)\r\n* fix: honor --timestamps when reading from stdin ([#380](https://github.com/stern/stern/pull/380)) 96b3c3a (Vincent)\r\n* fix: include the namespace in extjson and ppextjson for multiple namespaces ([#386](https://github.com/stern/stern/pull/386)) d6d42c9 (Ahmad Mehrabi)\r\n* fix: preserve the sign of fractional Unix timestamps ([#388](https://github.com/stern/stern/pull/388)) 6db257e (Haram Jeong)\r\n* docs: fix the function name in the colorCustom example ([#383](https://github.com/stern/stern/pull/383)) 050c9fe (Iain)\r\n* Assign distinct colors to pods created by the same workload ([#375](https://github.com/stern/stern/pull/375)) 74000c2 (Jojin)\r\n* Add --pager flag to pipe output into a pager ([#376](https://github.com/stern/stern/pull/376)) 4772306 (Jojin)\r\n* Hide the namespace when --namespace repeats a single namespace ([#389](https://","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}