{"id":20668087,"url":"https://github.com/daelvn/debugkit","last_synced_at":"2025-12-13T13:35:24.789Z","repository":{"id":94198988,"uuid":"207185878","full_name":"daelvn/debugkit","owner":"daelvn","description":"Print debugging made great again.","archived":false,"fork":false,"pushed_at":"2019-12-25T06:05:51.000Z","size":717,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T13:25:12.558Z","etag":null,"topics":["debug","documented","lua","moonscript","print"],"latest_commit_sha":null,"homepage":"https://git.daelvn.ga/debugkit","language":"MoonScript","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/daelvn.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}},"created_at":"2019-09-08T23:19:28.000Z","updated_at":"2019-12-25T06:05:53.000Z","dependencies_parsed_at":"2023-04-26T15:16:28.255Z","dependency_job_id":null,"html_url":"https://github.com/daelvn/debugkit","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daelvn%2Fdebugkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daelvn%2Fdebugkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daelvn%2Fdebugkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daelvn%2Fdebugkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daelvn","download_url":"https://codeload.github.com/daelvn/debugkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242873754,"owners_count":20199293,"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":["debug","documented","lua","moonscript","print"],"created_at":"2024-11-16T19:47:35.374Z","updated_at":"2025-12-13T13:35:19.721Z","avatar_url":"https://github.com/daelvn.png","language":"MoonScript","readme":"# debugkit\n\nPrint debugging made easier.\n\n## Why?\n\nWe all know what happens when we have to debug our code. Most of the times,\nwe don't use a full-fledged Lua debugger, and don't even think about it if\nyou are using MoonScript. What happens is that we end up putting `print`\nstatements in the part of the code that we guess the error is happening.\n\nNow, this usually solves most of our issues if our library is small, but\nif our library is gigantic, all you're going to get is a lot of unordered\nprinted tables and values. One approach I take is prefixing them with a\nword or tag, but then I would need a custom function to filter them out\nwhich was janky at best. I didn't want to add and remove messages. I didn't\nwant to get lost in a sea of all-white values. I needed something practical.\n\nThat is all very good, there are many logger libraries out there to help me.\nSo, why did I decide to make my own? If you told me I had [NHI Syndrome](https://en.wikipedia.org/wiki/Not_invented_here),\nI would probably agree with you, but I don't think that is the reason.\nI've been looking at other libraries, and some were old, some were oriented\nfor time logging, some weren't as flexible... If I kept dwelling, eventually\nI would have found one, but something powerful didn't seem to pop up that fast.\n\nWhat I made here is some kind of framework. Even though I would very happily\nadd features to the repo such as better stack traces, printing locals, etc. if\nanyone PR'ed them, there is none of that. This gives you mainly two concepts,\na logger and a sink. All around is just helper tools or functions. You can\nextend those two concepts to make amazing stuff. Hell, you could even submit\nlogging results via HTTP if you wanted. But I just wanna ~~grill~~ print!\n\nOr simply you just need a logger.\n\n## How?\n\nInstall the library using LuaRocks, and if I can be arsed in the future, my\nown Lua package manager that hopefully does not want to make me go live in a\nforest all by myself.\n\n```\n$ luarocks install debugkit\n```\n\nThat will automatically install all dependencies. If that is not the case for\nsome reason, do:\n\n```\n$ luarocks install filekit\n$ luarocks install guardia\n```\n\nAnd if you want to use the JSON sink in `debugkit.log.sinks`, install any of\n`dkjson`, `lua-cjson2` or `rxi-json-lua`. I've personally tested it under\n`cjson`, but all of them should work the same.\n\nIf you want to use the colorized `inspect` function in `debugkit.inspect`, you\nwill need `lrexlib-pcre2`. The strings are not precisely easy to color without them.\n\nYou can install optional dependencies using the metapackage `debugkit-extra`.\n\nThe documentation is availiable at https://git.daelvn.ga/debugkit.\n\n## When?\n\nIdeally when you need to debug, or log something. Perhaps if you want a pretty\n`inspect` function. Otherwise... what?\n\n## Who?\n\nDael Muñiz [daelvn@gmail.com](mailto:daelvn@gmail.com)\n\nI am so sorry if you can't type the ñ, I agree that I shouldn't have been born\nSpanish. Feel free to use \"Muniz\".\n\n## License\n\nThrowing this to the public domain. Steal it for all I care.\n\n## Goodbye?\n\nGoodbye.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaelvn%2Fdebugkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaelvn%2Fdebugkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaelvn%2Fdebugkit/lists"}