{"id":34151100,"url":"https://github.com/vncntx/captainslog","last_synced_at":"2026-03-09T22:03:10.977Z","repository":{"id":47033250,"uuid":"143618122","full_name":"vncntx/captainslog","owner":"vncntx","description":"A simple but powerful logging library for Go","archived":false,"fork":false,"pushed_at":"2023-02-25T09:48:22.000Z","size":1056,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-15T05:25:33.436Z","etag":null,"topics":["golang","logging","structured-logging"],"latest_commit_sha":null,"homepage":"https://vincent.click/captainslog","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vncntx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-05T14:07:43.000Z","updated_at":"2021-09-18T09:08:25.000Z","dependencies_parsed_at":"2022-08-26T10:11:58.851Z","dependency_job_id":null,"html_url":"https://github.com/vncntx/captainslog","commit_stats":null,"previous_names":["vincentfiestada/captainslog"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/vncntx/captainslog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vncntx%2Fcaptainslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vncntx%2Fcaptainslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vncntx%2Fcaptainslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vncntx%2Fcaptainslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vncntx","download_url":"https://codeload.github.com/vncntx/captainslog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vncntx%2Fcaptainslog/sbom","scorecard":{"id":922198,"data":{"date":"2025-08-04","repo":{"name":"github.com/vncntx/captainslog","commit":"0a9c3b0c479333cd5dd30aeaacbf6d2638b33bc7"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3.3,"checks":[{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/commit.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Info: Possibly incomplete results: error parsing shell code: invalid func name: .github/workflows/publish.yml:23","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/commit.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/vncntx/captainslog/commit.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/commit.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/vncntx/captainslog/commit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/commit.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/vncntx/captainslog/commit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/commit.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/vncntx/captainslog/commit.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vncntx/captainslog/publish.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T05:21:28.033Z","repository_id":47033250,"created_at":"2025-08-25T05:21:28.033Z","updated_at":"2025-08-25T05:21:28.033Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"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":["golang","logging","structured-logging"],"created_at":"2025-12-15T05:04:54.097Z","updated_at":"2026-03-09T22:03:10.972Z","avatar_url":"https://github.com/vncntx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](./icon.svg)\n\n# captainslog\n\n[![](https://github.com/vncntx/captainslog/workflows/Unit%20Tests/badge.svg)](https://github.com/vncntx/captainslog/actions?query=workflow%3A%22Unit+Tests%22)\n[![](https://github.com/vncntx/captainslog/workflows/Style%20Checks/badge.svg)](https://github.com/vncntx/captainslog/actions?query=workflow%3A%22Style+Checks%22)\n[![Go Reference](https://img.shields.io/badge/reference-007d9c.svg?labelColor=16161b\u0026logo=go\u0026logoColor=white)](https://pkg.go.dev/vincent.click/pkg/captainslog/v2?tab=doc)\n[![Conventional Commits](https://img.shields.io/badge/commits-conventional-0047ab.svg?labelColor=16161b)](https://conventionalcommits.org)\n[![License: BSD-3](https://img.shields.io/github/license/vncntx/captainslog.svg?labelColor=16161b\u0026color=0047ab)](./license)\n\nA simple logging library for [Go](https://golang.org/)\n\n- cross-platform colors\n- multiple log levels\n- structured logging\n- caller detection\n\n![Screenshot of captainslog in action](./assets/demo.png)\n\n## Installation\n\n```\ngo get vincent.click/pkg/captainslog/v2\n```\n\n## Usage\n\nThis library is designed to provide a familiar yet powerful logging interface. Each log method accepts a format string and arguments. Structured logging is supported right out of the box. You can turn colors on/off, specify a custom datetime format, set the minimum level that will be logged, and even provide your own function to control how logs are written.\n\n```go\npackage main\n\nimport (\n\t\"vincent.click/pkg/captainslog/v2\"\n)\n\nvar log = captainslog.NewLogger()\n\nfunc main() {\n\n\tlog.Trace(\"this is %s\", \"captainslog\")\n\tlog.Debug(\"this is %s\", \"captainslog\")\n\tlog.Info(\"this is %s\", \"captainslog\")\n\tlog.Warn(\"this is %s\", \"captainslog\")\n\tlog.Error(\"this is %s\", \"captainslog\")\n\n\tlog.Fields(\n\n\t\tlog.I(\"captain\", \"picard\"),\n\t\tlog.I(\"first officer\", \"riker\"),\n\t\tlog.I(\"science officer\", \"data\"),\n\t\tlog.I(\"medical officer\", \"crusher\"),\n\t\tlog.I(\"chief engineer\", \"la forge\"),\n\t\tlog.I(\"security officer\", \"worf\"),\n\n\t).Info(\"starship enterprise\")\n\n}\n```\n\n## Format\n\nThere are several [log formats](./docs/format.md) included that you can choose from. It's also easy to write your own custom function to print logs just the way you want to.\n\n## Performance\n\nThe main goals of this library are convenience and familiarity for programmers, but it should have reasonable performance for most projects. To see for yourself, run the benchmarks using `./tools benchmark`.\n\n## Development\n\nPlease read the [Contribution Guide](./CONTRIBUTING.md) before you proceed. This project uses [tools](https://vincent.click/toolkit) that run on [Powershell Core](https://microsoft.com/PowerShell). To get started,\n\n```ps1\n./tools help\n```\n\n## Copyright\n\nCopyright 2019-2021 [Vincent Fiestada](mailto:vincent@vincent.click). This project is released under an [MIT License](./license).\n\nIcon made by [Freepik](http://www.freepik.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvncntx%2Fcaptainslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvncntx%2Fcaptainslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvncntx%2Fcaptainslog/lists"}