{"id":38076965,"url":"https://github.com/openpitrix/logger","last_synced_at":"2026-01-16T20:45:10.348Z","repository":{"id":57498691,"uuid":"153422601","full_name":"openpitrix/logger","owner":"openpitrix","description":"Standard logger for OpenPitrix","archived":false,"fork":false,"pushed_at":"2018-10-20T05:33:40.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-28T17:37:46.778Z","etag":null,"topics":["logger","openpitrix"],"latest_commit_sha":null,"homepage":"https://godoc.org/openpitrix.io/logger","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openpitrix.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":"2018-10-17T08:29:48.000Z","updated_at":"2019-02-12T08:54:33.000Z","dependencies_parsed_at":"2022-09-06T17:10:55.336Z","dependency_job_id":null,"html_url":"https://github.com/openpitrix/logger","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/openpitrix/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpitrix","download_url":"https://codeload.github.com/openpitrix/logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpitrix%2Flogger/sbom","scorecard":{"id":709911,"data":{"date":"2025-08-11","repo":{"name":"github.com/openpitrix/logger","commit":"7f7a447ceb0ab02cf68d407398e6735fbf87e5cc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T07:49:27.506Z","repository_id":57498691,"created_at":"2025-08-22T07:49:27.506Z","updated_at":"2025-08-22T07:49:27.506Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["logger","openpitrix"],"created_at":"2026-01-16T20:45:10.241Z","updated_at":"2026-01-16T20:45:10.330Z","avatar_url":"https://github.com/openpitrix.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logger for OpenPitrix\n\n[![Build Status](https://travis-ci.org/openpitrix/logger.svg)](https://travis-ci.org/openpitrix/logger)\n[![Go Report Card](https://goreportcard.com/badge/openpitrix.io/logger)](https://goreportcard.com/report/openpitrix.io/logger)\n[![GoDoc](https://godoc.org/openpitrix.io/logger?status.svg)](https://godoc.org/openpitrix.io/logger)\n[![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/openpitrix/logger/blob/master/LICENSE)\n\n## Install\n\n1. Install Go1.11+\n1. set `GO111MODULE=on`\n1. `go get openpitrix.io/logger`\n1. `go run hello.go`\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\n\t\"openpitrix.io/logger\"\n\t\"openpitrix.io/logger/ctxutil\"\n)\n\nfunc main() {\n\tlogger.Infof(nil, \"hello1 openpitrix\")\n\n\tlogger.HideCallstack()\n\tlogger.Infof(nil, \"hello2 openpitrix\")\n\n\tlogger.ShowCallstack()\n\tlogger.Infof(nil, \"hello3 openpitrix\")\n\n\t{\n\t\tvar buf bytes.Buffer\n\t\tlogger := logger.New().SetOutput(\u0026buf)\n\n\t\tlogger.Infof(nil, \"hello4 openpitrix\")\n\t\tlogger.Infof(nil, \"hello5 openpitrix\\nlogger\")\n\t\tlogger.Infof(nil, \"\")\n\n\t\tfmt.Print(buf.String())\n\t}\n\n\tctx := context.Background()\n\tctx = ctxutil.SetRequestId(ctx, \"req-id-001\")\n\n\tlogger.Infof(ctx, \"hello context1\")\n\n\tctx = ctxutil.SetMessageId(ctx, \"msg-001\", \"msg-002\")\n\tlogger.Infof(ctx, \"hello context2\")\n\n\tctx = ctxutil.ClearRequestId(ctx)\n\tlogger.Infof(ctx, \"hello context3\")\n}\n```\n\noutput:\n\n```\n2018-10-20 07:43:31.70066 -INFO- hello1 openpitrix (hello.go:19)\n2018-10-20 07:43:31.70085 -INFO- hello2 openpitrix\n2018-10-20 07:43:31.70086 -INFO- hello3 openpitrix (hello.go:25)\n2018-10-20 07:43:31.70089 -INFO- hello4 openpitrix (hello.go:31)\n2018-10-20 07:43:31.70091 -INFO- hello5 openpitrix\\nlogger (hello.go:32)\n2018-10-20 07:43:31.70093 -INFO-  (hello.go:33)\n2018-10-20 07:43:31.70096 -INFO- hello context1 (hello.go:41){@req-id-001}\n2018-10-20 07:43:31.70099 -INFO- hello context2 (hello.go:44){msg-001|msg-002@req-id-001}\n2018-10-20 07:43:31.70101 -INFO- hello context3 (hello.go:47){msg-001|msg-002@}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpitrix%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpitrix%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpitrix%2Flogger/lists"}