{"id":37126367,"url":"https://github.com/jesse-rb/slogger-go","last_synced_at":"2026-01-14T14:36:15.387Z","repository":{"id":65552110,"uuid":"594297434","full_name":"jesse-rb/slogger-go","owner":"jesse-rb","description":"A small and simple go package that provides a few logging functions to log info/errors to aid in development","archived":false,"fork":false,"pushed_at":"2025-08-07T12:06:28.000Z","size":2407,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T13:14:41.479Z","etag":null,"topics":["go","logging","pkg"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/jesse-rb/slogger-go","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/jesse-rb.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,"zenodo":null}},"created_at":"2023-01-28T05:00:58.000Z","updated_at":"2025-08-07T11:20:05.000Z","dependencies_parsed_at":"2025-08-07T13:09:04.654Z","dependency_job_id":"dcb33bd1-a851-423c-8eb2-e6bb50a09165","html_url":"https://github.com/jesse-rb/slogger-go","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jesse-rb/slogger-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesse-rb%2Fslogger-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesse-rb%2Fslogger-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesse-rb%2Fslogger-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesse-rb%2Fslogger-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesse-rb","download_url":"https://codeload.github.com/jesse-rb/slogger-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesse-rb%2Fslogger-go/sbom","scorecard":{"id":516389,"data":{"date":"2025-08-11","repo":{"name":"github.com/jesse-rb/slogger-go","commit":"223f3db211100f71658eee4feca4b42bfbeafce5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"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":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/17 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.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":"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/tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/jesse-rb/slogger-go/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jesse-rb/slogger-go/tests.yml/main?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":"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":"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: MIT License: 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 'main'"],"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":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 19 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-20T01:56:01.900Z","repository_id":65552110,"created_at":"2025-08-20T01:56:01.900Z","updated_at":"2025-08-20T01:56:01.900Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28423835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"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":["go","logging","pkg"],"created_at":"2026-01-14T14:36:14.498Z","updated_at":"2026-01-14T14:36:15.365Z","avatar_url":"https://github.com/jesse-rb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slogger: simple go logger\n\nThis is a small go package that provides a few simple logging functions to aid in development.\nThis package allows you to register a new logger very similar to how you would a standard go `log.Logger`,\nwith the added ability to pass paremeters to configure a log color (using ANSI color codes) and some log prefixese.\n\n[pkg.go.dev docs page](https://pkg.go.dev/github.com/jesse-rb/slogger-go/v2)\n\n\n**install in project**\n\nUsing go modules, from your project directory you can run:\n\n```\ngo get github.com/jesse-rb/slogger-go/v2\n```\n\n\n**example usage**\n\n```\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\tslogger \"github.com/jesse-rb/slogger-go\"\n)\n\nfunc main() {\n\tslogger.GlobalPrefix = \"[slogger-example]\"\n\n\t// Declare some loggers\n\tinfoLogger := slogger.New(os.Stdout, slogger.ANSIBlue, \"INFO\", log.Lshortfile+log.Ldate)\n\terrorLogger := slogger.New(os.Stderr, slogger.ANSIRed, \"ERROR\", log.Lshortfile+log.Ldate)\n\n\t// Log some things\n\tinfoLogger.Log(\"main()\", \"Something worth noting happened\", 2+4)\n\terrorLogger.Log(\"main()\", \"Some horrible error happened\", []int{3, 5, 7})\n}\n```\n\n**preview logs**\n\n![preview image A](previews/preview-a.png)\n\n```\n[slogger-example] -\u003e INFO -\u003e 2025/08/08 main.go:18: main() -\u003e Something worth noting happened -\u003e data:\n6\n[slogger-example] -\u003e ERROR -\u003e 2025/08/08 main.go:19: main() -\u003e Some horrible error happened -\u003e data:\n[]int{3, 5, 7}\n```\n\n## References\n\nReferenced [3 bit 8 colours from Haoyi's Programming Blog](https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors)\nas most terminals should supprot this\n```\nconst (\n    ANSIReset    = \"\\u001b[0m\"\n    ANSIRed      = \"\\u001b[31m\"\n    ANSIBlue     = \"\\u001b[34m\"\n    ANSIBlack    = \"\\u001b[30m\"\n    ANSIGreen    = \"\\u001b[32m\"\n    ANSIYellow   = \"\\u001b[33m\"\n    ANSIMagenta  = \"\\u001b[35m\"\n    ANSICyan     = \"\\u001b[36m\"\n    ANSIWhite    = \"\\u001b[37m\"\n)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesse-rb%2Fslogger-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesse-rb%2Fslogger-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesse-rb%2Fslogger-go/lists"}