{"id":26149444,"url":"https://github.com/gofarsi/zapper","last_synced_at":"2025-10-06T11:51:58.312Z","repository":{"id":65518305,"uuid":"593178706","full_name":"GoFarsi/zapper","owner":"GoFarsi","description":"zapper is zap but customized with multi core and sentry support","archived":false,"fork":false,"pushed_at":"2023-11-20T08:47:01.000Z","size":73,"stargazers_count":10,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T17:51:49.025Z","etag":null,"topics":["go","golang","zap"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoFarsi.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}},"created_at":"2023-01-25T12:27:27.000Z","updated_at":"2024-10-03T05:16:54.000Z","dependencies_parsed_at":"2024-06-20T17:34:33.321Z","dependency_job_id":"857cb5fb-f7ab-4f3b-8e00-c2017cc2cba8","html_url":"https://github.com/GoFarsi/zapper","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoFarsi%2Fzapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoFarsi%2Fzapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoFarsi%2Fzapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoFarsi%2Fzapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoFarsi","download_url":"https://codeload.github.com/GoFarsi/zapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819355,"owners_count":21166474,"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":["go","golang","zap"],"created_at":"2025-03-11T05:31:56.302Z","updated_at":"2025-10-06T11:51:53.263Z","avatar_url":"https://github.com/GoFarsi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zapper [![Go Reference](https://pkg.go.dev/badge/github.com/GoFarsi/zapper.svg)](https://pkg.go.dev/github.com/GoFarsi/zapper) [![Go Report Card](https://goreportcard.com/badge/github.com/GoFarsi/zapper)](https://goreportcard.com/report/github.com/GoFarsi/zapper)\nzapper is zap but customized with multi core and sentry support, zapper make easiest usage with zap logger.\n\n### Cores\n- [x] Console Writer\n- [x] Sentry Core\n- [x] File Writer\n- [x] Json Core\n\n## Install\n\n```shell\n$ go get -u github.com/GoFarsi/zapper\n```\n\n## Example\n\n- Console writer core\n\n```go\npackage main\n\nimport (\n\t\"github.com/GoFarsi/zapper\"\n\t\"log\"\n)\n\nfunc main() {\n\tz := zapper.New(false, zapper.WithTimeFormat(zapper.RFC3339NANO))\n\tif err := z.NewCore(zapper.ConsoleWriterCore(true)); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tz.Info(\"test info\")\n\tz.Debug(\"debug level\")\n}\n```\n\n- Sentry Core\n\n```go\npackage main\n\nimport (\n\t\"github.com/GoFarsi/zapper\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\tz := zapper.New(false)\n\tif err := z.NewCore(zapper.SentryCore(os.Getenv(\"DSN\"), \"test\", zapper.DEVELOPMENT, nil)); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\terr(z)\n}\n\nfunc err(z zapper.Zapper) {\n\tz.Error(\"test error new\")\n}\n```\n\n- File Writer Core\n\n```go\npackage main\n\nimport (\n\t\"github.com/GoFarsi/zapper\"\n\t\"log\"\n)\n\nfunc main() {\n\tz := zapper.New(true, zapper.WithDebugLevel())\n\tif err := z.NewCore(zapper.FileWriterCore(\"./test_data\", nil)); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tz.Debug(\"debug log\")\n\tz.Info(\"info log\")\n\tz.Warn(\"warn log\")\n\tz.Error(\"error log\")\n}\n```\n\n- Json Core\n\n```go\npackage main\n\nimport (\n\t\"github.com/GoFarsi/zapper\"\n\t\"log\"\n)\n\nfunc main() {\n\tz := zapper.New(true, zapper.WithDebugLevel(), zapper.WithServiceDetails(23, \"zapper\"))\n\tif err := z.NewCore(zapper.JsonWriterCore(\"./test_data\", \".json\", nil)); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tz.Debug(\"debug log\")\n\tz.Info(\"info log\")\n\tz.Warn(\"warn log\")\n\tz.Error(\"error log\")\n}\n```\n\n- Multi Core\n\n```go\npackage main\n\nimport (\n\t\"github.com/GoFarsi/zapper\"\n\t\"log\"\n)\n\nfunc main() {\n\tz := zapper.New(false, zapper.WithDebugLevel())\n\tif err := z.NewCore(\n\t\tzapper.ConsoleWriterCore(true),\n\t\tzapper.FileWriterCore(\"./test_data\", nil),\n\t); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tz.Debug(\"debug log\")\n\tz.Info(\"info log\")\n\tz.Warn(\"warn log\")\n\tz.Error(\"error log\")\n}\n```\n\n## Contributing\n\n1. Fork zapper repository\n2. Clone forked project\n3. create new branch from main\n4. change things in new branch\n5. then send Pull Request from your changes in new branch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofarsi%2Fzapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgofarsi%2Fzapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgofarsi%2Fzapper/lists"}