{"id":15046938,"url":"https://github.com/alexlast/bunzap","last_synced_at":"2025-08-13T21:34:14.861Z","repository":{"id":164414262,"uuid":"639771676","full_name":"AlexLast/bunzap","owner":"AlexLast","description":"A query hook for uptrace/bun that logs with uber-go/zap.","archived":false,"fork":false,"pushed_at":"2024-11-25T19:36:13.000Z","size":27,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T22:12:33.912Z","etag":null,"topics":["bun","zap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexLast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-12T07:33:45.000Z","updated_at":"2024-08-02T15:07:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"677727fe-4b03-49ef-8985-337f1ff67b73","html_url":"https://github.com/AlexLast/bunzap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLast%2Fbunzap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLast%2Fbunzap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLast%2Fbunzap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLast%2Fbunzap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexLast","download_url":"https://codeload.github.com/AlexLast/bunzap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768422,"owners_count":19527197,"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":["bun","zap"],"created_at":"2024-09-24T20:53:47.012Z","updated_at":"2025-02-14T02:32:42.968Z","avatar_url":"https://github.com/AlexLast.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bunzap\nA query hook for [uptrace/bun](https://github.com/uptrace/bun) that logs with [uber-go/zap](https://github.com/uber-go/zap).\n\n```bash\n$ go get github.com/alexlast/bunzap\n```\n\nAll errors will be logged at error level with the hook enabled, everything else will be logged as debug. If `SlowDuration` is defined, only operations taking longer than the defined duration will be logged.\n\n## Usage\n```go\ndb := bun.NewDB()\nlogger, err := zap.NewProduction()\ndb.AddQueryHook(bunzap.NewQueryHook(bunzap.QueryHookOptions{\n    Logger:       logger,\n    SlowDuration: 200 * time.Millisecond, // Omit to log all operations as debug\n}))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexlast%2Fbunzap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexlast%2Fbunzap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexlast%2Fbunzap/lists"}