{"id":1360,"url":"https://github.com/diegotl/OkLog-Swift","last_synced_at":"2025-08-02T04:30:56.132Z","repository":{"id":62449556,"uuid":"139282477","full_name":"diegotl/OkLog-Swift","owner":"diegotl","description":"A network logger for iOS and macOS projects.","archived":false,"fork":false,"pushed_at":"2022-06-16T12:16:54.000Z","size":70,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-02T01:48:50.827Z","etag":null,"topics":["alamofire","ios","logging","macos","okhttp","osx","swift","urlsession"],"latest_commit_sha":null,"homepage":"","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/diegotl.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":"2018-06-30T21:49:03.000Z","updated_at":"2021-12-24T03:46:24.000Z","dependencies_parsed_at":"2022-11-01T23:17:57.594Z","dependency_job_id":null,"html_url":"https://github.com/diegotl/OkLog-Swift","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/diegotl/OkLog-Swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegotl%2FOkLog-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegotl%2FOkLog-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegotl%2FOkLog-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegotl%2FOkLog-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegotl","download_url":"https://codeload.github.com/diegotl/OkLog-Swift/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegotl%2FOkLog-Swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268187860,"owners_count":24209924,"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-08-01T02:00:08.611Z","response_time":67,"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":["alamofire","ios","logging","macos","okhttp","osx","swift","urlsession"],"created_at":"2024-01-05T20:15:44.663Z","updated_at":"2025-08-02T04:30:56.080Z","avatar_url":"https://github.com/diegotl.png","language":"Swift","funding_links":[],"categories":["Logging"],"sub_categories":["Other Hardware"],"readme":"# OkLog for iOS and macOS\n[![Build Status](https://app.bitrise.io/app/dae5e4af48f49ab5/status.svg?token=Z7i_ZSE2M1FAD-F3H_lc8Q)](https://app.bitrise.io/app/dae5e4af48f49ab5)\n[![SPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager)\n![CocoaPods Compatible](https://img.shields.io/cocoapods/v/OkLog.svg)\n[![codebeat badge](https://codebeat.co/badges/f89dff10-4b71-4499-ba25-5cd80a7483c7)](https://codebeat.co/projects/github-com-diegotl-oklog-swift-master)\n![Languages](https://img.shields.io/badge/languages-Swift%20%7C%20ObjC-333333.svg)\n\nOkLog-Swift is a network logger written in Swift highly inspired by [simonpercic's original OkLog implementation](https://github.com/simonpercic/OkLog/) to be used in iOS and macOS projects.\n\n## What does it do?\nOkLog encodes request \u0026 response data and generates an URL from where you can see all those info nicely, making it easy to debug and share network data. [Here's an example](http://oklog.responseecho.com/v1/r/H4sIAAAAAAAAE1WQTU_DMAyG7_yKycepS1c2KlbEoaBJCE1CQnDrJSReGmiTkGQSUO2_47Qgxs1-_bz-GoB7FaAajhlIHjlUMDSgZQPVKmvA8B4pbODetmZWO9dhQKTqETLYa8om6976fopa5BJ9kqEWAl2kjvN8TviULrZGWKmNIl19aXf1fl2wZTYTtnceQ6B8yS7-8B036sAVEo7mFyb95nEkN0TeWmNQRG0NQaKzAScxoiE_GhVbKqzOT9SnT5c6cjpIC56s-WsgfwZ3NqSV2xjdizbMekXic0C_qBU5qfTwtrNq-8F7egbQxaORztUy_Wx8GVH_H5Y467XSacWivGTFZs2KsmDlmtoffPczMlR5fjI6l9hhpCln34MRloGoAQAA?qb=H4sIAAAAAAAAE6tWykxRsjLWUcpLzE1VslLyys_IU3AsKMhJLU5NTVGqBQDWFO9RIAAAAA==\u0026d=H4sIAAAAAAAAE4WQzUoDMRRGKVOLhqIlIGhFyEYo4vxkLFK7G9pBkUrBVtfG6SVNGpMhkxnr1qfpo_hYTgV3oqsL957vXPhQa5xO0nmKu0vn8mIYhtv5InRgLA8XoMBBd-f71iMxQe2R0Q608-fvOeAOy3MlMuaE0aEsjI67CD0WYP2E1xBuT1cTw9M1e80V3H42Hna1IWCtsc8bT_5rk4do_4eYgOZuib1-3JdHCNVrDdmWxGgFkPtMiQpkD5Eky6Ao_G3OGuUnSpk3f2RhUVsEUwVuOltC_fzkV3JqBRcaN87lMWrNwFZg8QEvtciM1SG9DgYBlR3kPQmG92hASQW8tPIMNcfMAT6dlfqCRJTclYrEER0QejWM6PAyIjf38_XG-2j80fQXeQd4P44BAAA=\u0026s=1).\n\n## Installation\n### CocoaPods\nOkLog is integrated with [CocoaPods](http://cocoapods.org). To use it in your project, add to your `Podfile`:\n```ruby\npod 'OkLog'\n```\nor\n```ruby\npod 'OkLog/Alamofire'\n```\n\nand then don't forget to run:\n```bash\n$ pod install\n```\n\n### Swift Package Manager\nOkLog is also available through SPM.\n\n## Usage\n#### URLSession\nIn the `URLSession`'s result closure simply call\n```swift\nOkLog.log(request: request, response: response, data: data)\n```\nto get the URL printed in Xcode's console, or\n```swift\nlet url = OkLog.getUrl(request: request, response: response, data: data)\n```\nto retrieve it and do whatever you want.\n\n#### Alamofire\nIf you are using Alamofire, place\n```swift\nOkLog.log(response)\n```\nor\n```swift\nlet url = OkLog.getUrl(response)\n```\nin the request's completion closure.\n\nYou can also opt-out from URL shortening by specifying `shortenUrl: false` as parameter.\n\nAn example project is included with a few sample requests using URLSession and Alamofire.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegotl%2FOkLog-Swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegotl%2FOkLog-Swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegotl%2FOkLog-Swift/lists"}