{"id":19932335,"url":"https://github.com/adamwulf/logfmt","last_synced_at":"2025-03-01T11:27:49.148Z","repository":{"id":246728045,"uuid":"821674004","full_name":"adamwulf/Logfmt","owner":"adamwulf","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-29T20:33:52.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T03:34:34.582Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/adamwulf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-06-29T05:49:25.000Z","updated_at":"2024-06-30T01:35:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"c78a789d-da4e-4449-b269-1ab024f3e49b","html_url":"https://github.com/adamwulf/Logfmt","commit_stats":null,"previous_names":["adamwulf/logfmt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwulf%2FLogfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwulf%2FLogfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwulf%2FLogfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamwulf%2FLogfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamwulf","download_url":"https://codeload.github.com/adamwulf/Logfmt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241358524,"owners_count":19949913,"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":[],"created_at":"2024-11-12T23:09:50.548Z","updated_at":"2025-03-01T11:27:48.864Z","avatar_url":"https://github.com/adamwulf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logfmt\n\nLogfmt provides a `logfmt(object)` method on `String` instances to easily format any input object into [logfmt](https://www.brandur.org/logfmt).\n\nExample:\n\n``` swift\n\nlet memoryContext = [\"memory\":\n                        [\"current\": [\"footprint\": 128,\n                                     \"available\": 2000 - 128,\n                                     \"limit\": 2000],\n                         \"peak\": [\"footprint\": 348,\n                                  \"available\": 2000 - 348,\n                                  \"limit\": 2000]]]\nlet formatted = String.logfmt(memoryContext)\nprint(formatted)\n```\n\nwill output:\n\n```\nmemory.current.available=1872 memory.current.footprint=128 memory.current.limit=2000 memory.peak.available=1652 memory.peak.footprint=348 memory.peak.limit=2000\n```\n\nThe `Logfmt` class is in progress will eventually help integrate apple's [Logging](https://github.com/apple/swift-log) framework. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamwulf%2Flogfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamwulf%2Flogfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamwulf%2Flogfmt/lists"}