{"id":13462485,"url":"https://github.com/google/logger","last_synced_at":"2026-01-12T01:51:13.495Z","repository":{"id":42188214,"uuid":"52376011","full_name":"google/logger","owner":"google","description":"Cross platform Go logging library.","archived":false,"fork":false,"pushed_at":"2023-07-05T23:08:51.000Z","size":40,"stargazers_count":889,"open_issues_count":8,"forks_count":82,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-10-24T08:43:43.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","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":"2016-02-23T17:00:59.000Z","updated_at":"2025-09-14T16:14:21.000Z","dependencies_parsed_at":"2024-06-18T11:30:08.243Z","dependency_job_id":"833b3ee5-3d99-4bf8-8f9c-fe9c1ed80e52","html_url":"https://github.com/google/logger","commit_stats":{"total_commits":37,"total_committers":13,"mean_commits":"2.8461538461538463","dds":0.5405405405405406,"last_synced_commit":"1dc1d7037cd6657ae49c2aa2c8fd6a78e0176c1a"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/google/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Flogger/sbom","scorecard":{"id":437397,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/logger","commit":"22a116c1d039d8dff1a6169f1daa69fc9e2cc8c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/google/logger/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/google/logger/go.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"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":"Code-Review","score":8,"reason":"Found 23/28 approved changesets -- score normalized to 8","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T04:59:42.623Z","repository_id":42188214,"created_at":"2025-08-19T04:59:42.624Z","updated_at":"2025-08-19T04:59:42.624Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":"2024-07-31T12:00:49.327Z","updated_at":"2026-01-12T01:51:13.479Z","avatar_url":"https://github.com/google.png","language":"Go","funding_links":[],"categories":["Misc","Go","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# logger #\nLogger is a simple cross platform Go logging library for Windows, Linux, FreeBSD, and\nmacOS, it can log to the Windows event log, Linux/macOS syslog, and an io.Writer.\n\nThis is not an official Google product.\n\n## Usage ##\n\nSet up the default logger to log the system log (event log or syslog) and a\nfile, include a flag to turn up verbosity:\n\n```go\nimport (\n  \"flag\"\n  \"os\"\n\n  \"github.com/google/logger\"\n)\n\nconst logPath = \"/some/location/example.log\"\n\nvar verbose = flag.Bool(\"verbose\", false, \"print info level logs to stdout\")\n\nfunc main() {\n  flag.Parse()\n\n  lf, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0660)\n  if err != nil {\n    logger.Fatalf(\"Failed to open log file: %v\", err)\n  }\n  defer lf.Close()\n\n  defer logger.Init(\"LoggerExample\", *verbose, true, lf).Close()\n\n  logger.Info(\"I'm about to do something!\")\n  if err := doSomething(); err != nil {\n    logger.Errorf(\"Error running doSomething: %v\", err)\n  }\n}\n```\n\nThe Init function returns a logger so you can setup multiple instances if you\nwish, only the first call to Init will set the default logger:\n\n```go\nlf, err := os.OpenFile(logPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0660)\nif err != nil {\n  logger.Fatalf(\"Failed to open log file: %v\", err)\n}\ndefer lf.Close()\n\n// Log to system log and a log file, Info logs don't write to stdout.\nloggerOne := logger.Init(\"LoggerExample\", false, true, lf)\ndefer loggerOne.Close()\n// Don't to system log or a log file, Info logs write to stdout..\nloggerTwo := logger.Init(\"LoggerExample\", true, false, ioutil.Discard)\ndefer loggerTwo.Close()\n\nloggerOne.Info(\"This will log to the log file and the system log\")\nloggerTwo.Info(\"This will only log to stdout\")\nlogger.Info(\"This is the same as using loggerOne\")\n\n```\n\n## Custom Format ##\n\n| Code                                 | Example                                                  |\n|--------------------------------------|----------------------------------------------------------|\n| `logger.SetFlags(log.Ldate)`         | ERROR: 2018/11/11 Error running Foobar: message          |\n| `logger.SetFlags(log.Ltime)`         | ERROR: 09:42:45 Error running Foobar: message            |\n| `logger.SetFlags(log.Lmicroseconds)` | ERROR: 09:42:50.776015 Error running Foobar: message     |\n| `logger.SetFlags(log.Llongfile)`     | ERROR: /src/main.go:31: Error running Foobar: message    |\n| `logger.SetFlags(log.Lshortfile)`    | ERROR: main.go:31: Error running Foobar: message         |\n| `logger.SetFlags(log.LUTC)`          | ERROR: Error running Foobar: message                     |\n| `logger.SetFlags(log.LstdFlags)`     | ERROR: 2018/11/11 09:43:12 Error running Foobar: message |\n\n```go\nfunc main() {\n    lf, err := os.OpenFile(logPath, …, 0660)\n    defer logger.Init(\"foo\", *verbose, true, lf).Close()\n    logger.SetFlags(log.LstdFlags)\n}\n```\n\nMore info: https://golang.org/pkg/log/#pkg-constants\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Flogger/lists"}