{"id":26281102,"url":"https://github.com/romantomjak/devslog","last_synced_at":"2026-05-18T13:32:46.287Z","repository":{"id":282125365,"uuid":"947519823","full_name":"romantomjak/devslog","owner":"romantomjak","description":"log/slog handler that formats records where message is followed by each of it's attributes on seperate lines","archived":false,"fork":false,"pushed_at":"2025-03-12T23:43:02.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T09:58:19.195Z","etag":null,"topics":["go","slog","slog-handler"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/romantomjak/devslog","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/romantomjak.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-12T20:20:17.000Z","updated_at":"2025-03-12T23:08:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e09cf77-33c5-4d88-9229-94cb27bb4fb7","html_url":"https://github.com/romantomjak/devslog","commit_stats":null,"previous_names":["romantomjak/devslog"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/romantomjak/devslog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fdevslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fdevslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fdevslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fdevslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romantomjak","download_url":"https://codeload.github.com/romantomjak/devslog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romantomjak%2Fdevslog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28083459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","slog","slog-handler"],"created_at":"2025-03-14T15:19:19.924Z","updated_at":"2025-12-27T19:05:26.070Z","avatar_url":"https://github.com/romantomjak.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devslog\n\n\u003ccenter\u003e\u003cimg src=\"screenshot.png\" /\u003e\u003c/center\u003e\n\nPackage devslog provides a [log/slog](https://pkg.go.dev/log/slog) handler\nthat formats records where message is followed by each of it's attributes\non seperate lines.\n\nIt implements the `slog.Handler` interface to format the record's message.\n\nThe default `slog.TextHandler` output adds year/month/date which I rarely find\nuseful when working on code locally. This is what `slog.TextHandler` default\noutput looks like:\n\n```sh\n2022/11/08 15:28:26 INFO hello count=3 method=GET request=http://example.com\n```\n\nThis package turns the above message into this:\n\n```sh\n15:28:26 INFO hello\n ↳ count: 3\n ↳ method: GET\n ↳ request: http://example.com\n```\n\nThe devslog handler can be set as the default logger with:\n\n```go\ndevslog.SetDefault(os.Stdout, \u0026slog.HandlerOptions{\n    Level: slog.LevelDebug,\n})\n```\n\nThe top-level slog functions `slog.Info`, `slog.Debug`, etc will all use this\nhandler to format the records. `SetDefault` also updates the default logger\nused by the [log](https://pkg.go.dev/log) package, so that existing applications\nthat use `log.Printf` and related functions will send log records to the logger's\nhandler without needing to be rewritten.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fdevslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromantomjak%2Fdevslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromantomjak%2Fdevslog/lists"}