{"id":48495156,"url":"https://github.com/structx/tea","last_synced_at":"2026-04-07T12:01:26.434Z","repository":{"id":331418122,"uuid":"1126424326","full_name":"structx/tea","owner":"structx","description":"golang logger 🫖 ","archived":false,"fork":false,"pushed_at":"2026-02-15T07:00:05.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-15T13:15:58.713Z","etag":null,"topics":["golang","logging"],"latest_commit_sha":null,"homepage":"","language":"Go","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/structx.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T22:10:42.000Z","updated_at":"2026-02-15T06:58:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/structx/tea","commit_stats":null,"previous_names":["structx/teapot","structx/tea"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/structx/tea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structx%2Ftea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structx%2Ftea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structx%2Ftea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structx%2Ftea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/structx","download_url":"https://codeload.github.com/structx/tea/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structx%2Ftea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31511784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","logging"],"created_at":"2026-04-07T12:01:24.334Z","updated_at":"2026-04-07T12:01:26.331Z","avatar_url":"https://github.com/structx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍵 Teapot\n\nTeapot is a high-performance, zero-allocation structured logging library for Go. Built with zero external dependencies, it utilizes an optimized sync.Pool and an explicit attribute system to provide a high-speed logging experience without the overhead of reflection or interface boxing.\n\n## 📦 Installation\n\n```bash\ngo get github.com/structx/teapot\n```\n\n## 🚀 Key Features\n\nZero Allocations: Optimized to hit 0 B/op and 0 allocs/op in standard hot paths.\\\nExplicit Type System: Uses a \"Fat Attr\" struct to avoid reflection and unnecessary heap escapes.\\\nNative JSON Support: High-speed JSON output designed for production log aggregators.\\\nBuilt-in Stack Traces: Automatic capture of runtime.Stack for ERROR and FATAL levels.\n\n## ⚡ Performance\n\n```bash\ngoos: linux\ngoarch: amd64\npkg: github.com/structx/teapot\ncpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz\nBenchmarkLogger_JSON-12         70972780               171.4 ns/op             0 B/op          0 allocs/op\nPASS\nok      github.com/structx/teapot       12.340s\n```\n\n## 🛠 Usage\nStrongly Typed Attributes\n\nTeapot avoids the overhead of interface{} by providing explicit attribute constructors. This ensures your logs are fast and type-safe.\n```go\npackage main\n\nimport (\n    \"github.com/structx/teapot\"\n)\n\nfunc main() {\n    log := teapot.New(\n        teapot.WithLevel(teapot.INFO),\n    )\n\n    log.Infof(\"user login attempt\", \n        teapot.String(\"user\", \"alice\"),\n        teapot.Int(\"attempts\", 1),\n        teapot.Bool(\"success\", true),\n    )\n}\n```\n\n## Error Handling \u0026 Stack Traces\n\nTeapot automatically captures a full stack trace when logging at the ERROR or FATAL level. Use the Err helper for consistent naming:\n```go\nif err := db.Connect(); err != nil {\n    // This will include a \"stacktrace\" field in the JSON output automatically\n    log.Error(\"database failure\", teapot.Err(err))\n}\n```\n\n## ⚙️ Configuration\nOption\tDescription\tDefault\\\nWithLevel(lvl)\tSets minimum logging threshold\t`DEBUG`\\\nWithWriter(w)\tDestination (file, stdout, etc)\tos.Stdout\n\n## ⚖️ License\nMIT License. See [License](LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructx%2Ftea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstructx%2Ftea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructx%2Ftea/lists"}