{"id":15632734,"url":"https://github.com/kirilldanshin/dlog","last_synced_at":"2025-07-17T16:37:33.108Z","repository":{"id":57497023,"uuid":"62585134","full_name":"kirillDanshin/dlog","owner":"kirillDanshin","description":"Simple build-time controlled debug log with ability to log where the logger was called","archived":false,"fork":false,"pushed_at":"2017-07-28T00:08:08.000Z","size":21,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-23T02:55:27.527Z","etag":null,"topics":["compile-time-enabling","debug","debuging-tool","dlog","golang","log"],"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/kirillDanshin.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}},"created_at":"2016-07-04T19:59:09.000Z","updated_at":"2022-09-27T09:47:26.000Z","dependencies_parsed_at":"2022-09-03T23:50:55.699Z","dependency_job_id":null,"html_url":"https://github.com/kirillDanshin/dlog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillDanshin%2Fdlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillDanshin%2Fdlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillDanshin%2Fdlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillDanshin%2Fdlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirillDanshin","download_url":"https://codeload.github.com/kirillDanshin/dlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251644178,"owners_count":21620615,"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","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":["compile-time-enabling","debug","debuging-tool","dlog","golang","log"],"created_at":"2024-10-03T10:45:09.545Z","updated_at":"2025-04-30T04:34:15.141Z","avatar_url":"https://github.com/kirillDanshin.png","language":"Go","readme":"# dlog [![GoDoc](https://godoc.org/github.com/kirillDanshin/dlog?status.svg)](https://godoc.org/github.com/kirillDanshin/dlog) [![Go Report Card](https://goreportcard.com/badge/github.com/kirillDanshin/dlog)](https://goreportcard.com/report/github.com/kirillDanshin/dlog)\nSimple build-time controlled debug log\n\n# How to use\n### Unbuffered\n```go\npackage main\n\nimport \"github.com/kirillDanshin/dlog\"\n\nfunc main() {\n\ta := []int{2, 4, 8, 16, 32, 64, 128, 256, 512}\n\tb := \"some string\"\n\t\n\tdlog.D(a)\t\t// D'ump `a`\n\tdlog.P(b)\t\t// P'rint `b`\n\tdlog.F(\"%s format\", b)\t// F'ormatted print\n\tdlog.Ln(b)\t\t// print'Ln `b`\n}\n```\n\n### Buffered\n```go\npackage main\n\nimport \"github.com/kirillDanshin/dlog\"\n\nfunc main() {\n\tlog := dlog.NewBuffered()\n\tdefer log.Release()\n\t\n\tlog.D(a)\t\t// D'ump `a`\n\tlog.P(b)\t\t// P'rint `b`\n\tlog.F(\"%s format\", b)\t// F'ormatted print\n\tlog.Ln(b)\t\t// print'Ln `b`\n\n\tdlog.Ln(log) // or fmt.Println(\"log\") etc.\n}\n```\n\n# Release\nTo disable logging in release build just run\n```bash\n\tgo build\n```\n\n# Debug\nTo enable logging in debug build run\n```bash\n\tgo build -tags \"debug\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirilldanshin%2Fdlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirilldanshin%2Fdlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirilldanshin%2Fdlog/lists"}