{"id":18655457,"url":"https://github.com/kevwan/stack","last_synced_at":"2025-04-11T17:31:56.377Z","repository":{"id":65383839,"uuid":"591286971","full_name":"kevwan/stack","owner":"kevwan","description":"A cli tool to prettify stacktrace in json logs.","archived":false,"fork":false,"pushed_at":"2023-01-23T12:10:46.000Z","size":9,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T04:39:45.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevwan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-20T11:42:19.000Z","updated_at":"2024-04-29T02:43:42.000Z","dependencies_parsed_at":"2023-02-12T23:00:52.470Z","dependency_job_id":null,"html_url":"https://github.com/kevwan/stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevwan%2Fstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevwan","download_url":"https://codeload.github.com/kevwan/stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449853,"owners_count":21105577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T07:18:59.676Z","updated_at":"2025-04-11T17:31:56.069Z","avatar_url":"https://github.com/kevwan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stack\nA cli tool to prettify stacktrace in json logs.\n\n## Why to write this tool?\nWhen we read the stacktrace info from json logs, it's hard to read without pretty print.\n\n## Usage\n\n### 1. From stdin\n\n```json\n{\"@timestamp\":\"2023-01-20T19:56:57.806+08:00\",\"content\":\"panic\\ngoroutine 1 [running]:\\nruntime/debug.Stack()\\n\\t/usr/local/go/src/runtime/debug/stack.go:24 +0x64\\ngithub.com/zeromicro/go-zero/core/logx.writeStack({0x14000092008, 0x5})\\n\\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:457 +0x48\\ngithub.com/zeromicro/go-zero/core/logx.ErrorStack({0x140002dff58?, 0x1400010e000?, 0x0?})\\n\\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:113 +0x24\\nmain.main()\\n\\t/Users/kevin/Develop/go/opensource/go-zero/adhoc/log/main.go:17 +0x80\\n\",\"level\":\"error\"}\n```\n\n```shell\n$ tail -f error.log | stack -i\n{\"@timestamp\":\"2023-01-20T19:57:01.810+08:00\",\"content\":\"panic\ngoroutine 1 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x64\ngithub.com/zeromicro/go-zero/core/logx.writeStack({0x1400012e240, 0x5})\n\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:457 +0x48\ngithub.com/zeromicro/go-zero/core/logx.ErrorStack({0x140002dff58?, 0x1400009c540?, 0x140000b8060?})\n\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:113 +0x24\nmain.main()\n\t/Users/kevin/Develop/go/opensource/go-zero/adhoc/log/main.go:17 +0x80\n\",\"level\":\"error\"}\n```\n\n### 2. From clipboard\n\n#### Steps\n\n1. copy the content\n2. run `stack` without `-i`\n\n```shell\n{\"@timestamp\":\"2023-01-20T19:57:01.810+08:00\",\"content\":\"panic\ngoroutine 1 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x64\ngithub.com/zeromicro/go-zero/core/logx.writeStack({0x1400012e240, 0x5})\n\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:457 +0x48\ngithub.com/zeromicro/go-zero/core/logx.ErrorStack({0x140002dff58?, 0x1400009c540?, 0x140000b8060?})\n\t/Users/kevin/Develop/go/opensource/go-zero/core/logx/logs.go:113 +0x24\nmain.main()\n\t/Users/kevin/Develop/go/opensource/go-zero/adhoc/log/main.go:17 +0x80\n\",\"level\":\"error\"}\n```\n\n## Give a Star! ⭐\n\nIf you like or are using this project to learn or start your solution, please give it a star. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevwan%2Fstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevwan%2Fstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevwan%2Fstack/lists"}