{"id":42951013,"url":"https://github.com/pnelson/log","last_synced_at":"2026-01-30T21:11:28.413Z","repository":{"id":57629418,"uuid":"403259712","full_name":"pnelson/log","owner":"pnelson","description":"Package log implements structured logging helpers.","archived":false,"fork":false,"pushed_at":"2021-10-19T04:07:29.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T05:13:03.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/pnelson/log","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnelson.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":"2021-09-05T08:53:50.000Z","updated_at":"2021-10-19T04:07:32.000Z","dependencies_parsed_at":"2022-09-18T05:24:35.495Z","dependency_job_id":null,"html_url":"https://github.com/pnelson/log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pnelson/log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnelson%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnelson%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnelson%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnelson%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnelson","download_url":"https://codeload.github.com/pnelson/log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnelson%2Flog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28919470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T20:25:28.696Z","status":"ssl_error","status_checked_at":"2026-01-30T20:25:13.426Z","response_time":66,"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":[],"created_at":"2026-01-30T21:11:27.699Z","updated_at":"2026-01-30T21:11:28.408Z","avatar_url":"https://github.com/pnelson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log\n\nPackage log implements structured logging helpers.\n\nLevels are supported with the following intended production semantics:\n\n- `DBG` *debug*\n- `INF` *machine-actionable*\n- `WRN` *human-observable*\n- `ERR` *human-actionable*\n\nHandlers are used to format log entry output. The following functions return\nloggers with preconfigured handlers. Optionally write your own by implementing\nthe `log.Handler` interface.\n\n- [NewLogger](https://pkg.go.dev/github.com/pnelson/log#NewLogger)\n- [NewTextLogger](https://pkg.go.dev/github.com/pnelson/log#NewTextLogger)\n- [NewShellLogger](https://pkg.go.dev/github.com/pnelson/log#NewShellLogger)\n- [NewMinimalShellLogger](https://pkg.go.dev/github.com/pnelson/log#NewMinimalShellLogger)\n- [NewDiscardLogger](https://pkg.go.dev/github.com/pnelson/log#NewDiscardLogger)\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/pnelson/log\"\n)\n\nfunc main() {\n\tloggers := []*log.Logger{\n\t\tlog.NewLogger(os.Stderr, false),\n\t\tlog.NewTextLogger(os.Stderr),\n\t\tlog.NewShellLogger(os.Stderr),\n\t\tlog.NewMinimalShellLogger(os.Stderr),\n\t\tlog.NewDiscardLogger(),\n\t}\n\tfor _, l := range loggers {\n\t\tl.Log(log.ERR, log.M{\"foo\": \"bar\"}, \"baz/%s\", \"qux\")\n\t}\n}\n```\n\n![Usage Output](docs/output.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnelson%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnelson%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnelson%2Flog/lists"}