{"id":16612895,"url":"https://github.com/ttys3/slogx","last_synced_at":"2026-02-25T01:33:50.334Z","repository":{"id":65193947,"uuid":"582839858","full_name":"ttys3/slogx","owner":"ttys3","description":"Simple slog wrapper for easy life,  with opentelemetry tracing support","archived":false,"fork":false,"pushed_at":"2025-03-10T22:01:54.000Z","size":72,"stargazers_count":30,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T05:09:07.465Z","etag":null,"topics":["console","golang","opentelemetry","slog","structured-logging","trace-id","tracing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttys3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-28T02:28:43.000Z","updated_at":"2025-10-26T20:09:03.000Z","dependencies_parsed_at":"2024-06-21T20:21:52.403Z","dependency_job_id":"9e1a4b8e-8481-4f49-bbf5-792c9ad724e7","html_url":"https://github.com/ttys3/slogx","commit_stats":null,"previous_names":["ttys3/sslog","ttys3/slogsimple"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ttys3/slogx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys3%2Fslogx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys3%2Fslogx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys3%2Fslogx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys3%2Fslogx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttys3","download_url":"https://codeload.github.com/ttys3/slogx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttys3%2Fslogx/sbom","scorecard":{"id":901651,"data":{"date":"2025-08-11","repo":{"name":"github.com/ttys3/slogx","commit":"0476e735d8295ba677fa93168f50a66ff891f875"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"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-24T15:47:47.792Z","repository_id":65193947,"created_at":"2025-08-24T15:47:47.792Z","updated_at":"2025-08-24T15:47:47.792Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29807949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"ssl_error","status_checked_at":"2026-02-24T22:43:18.536Z","response_time":75,"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":["console","golang","opentelemetry","slog","structured-logging","trace-id","tracing"],"created_at":"2024-10-12T01:45:16.066Z","updated_at":"2026-02-25T01:33:50.304Z","avatar_url":"https://github.com/ttys3.png","language":"Go","readme":"# slogx\n\n\u003e `log/slog` stdlib requires go version \u003e= 1.21.0\n\nslog handler with opentelemetry tracing support and simple init helper method\n\ntrace_id in log\n\n![image](https://github.com/ttys3/slogx/assets/41882455/281b00e7-fd7e-4e4c-b3e7-ea3f7ab27066)\n\n\nadded Apex log cli handler like handler (impl ref https://github.com/apex/log/blob/master/handlers/cli/cli.go)\n\n![apex cli log like handler](https://user-images.githubusercontent.com/41882455/259750348-3f9b85ff-1403-482a-acfe-a028c7551185.png)\n\n## usage\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"github.com/ttys3/slogx\"\n    \"github.com/ttys3/tracing-go\"\n    \"go.opentelemetry.io/otel\"\n    \"log/slog\"\n    \"io\"\n)\n\nfunc main() {\n\t// init a new slog json handler at info level with output to stderr\n\t// and wrap it within a tracing handler\n\tlogger := slogx.New(slogx.WithTracing())\n\tslog.SetDefault(logger)\n\n\tctx := context.Background()\n\n\t// set up a recording tracer, non-recording span will not get a trace_id\n\ttpShutdown, err := tracing.InitProvider(ctx, tracing.WithStdoutTrace())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer tpShutdown(context.Background())\n\n\tctx, newSpan := otel.Tracer(\"my-tracer-name\").Start(ctx, \"hello.Slog\")\n\tdefer newSpan.End()\n\tlog := slog.With(\"user_id\", 123456)\n\t// no trace_id in log\n\tlog.Info(\"hello world\")\n\n\t// has trace_id in log\n\tlog.With(\"foo\", \"bar\").ErrorContext(ctx, \"have a nice day\", \"err\", io.ErrClosedPipe)\n\tlog.ErrorContext(ctx, \"example error\", \"err\", io.ErrClosedPipe)\n}\n```\n\n## related projects\n\nslog.Handler that writes tinted logs\nhttps://github.com/lmittmann/tint/\n\n\nExample ConsoleHandler for slog Logger\nhttps://gist.github.com/wijayaerick/de3de10c47a79d5310968ba5ff101a19\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttys3%2Fslogx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttys3%2Fslogx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttys3%2Fslogx/lists"}