{"id":13465871,"url":"https://github.com/cookpad/puree-ios","last_synced_at":"2025-03-25T21:30:36.212Z","repository":{"id":64190343,"uuid":"27806043","full_name":"cookpad/puree-ios","owner":"cookpad","description":"[Obsoleted] A log collector for iOS (new version! -\u003e https://github.com/cookpad/Puree-Swift)","archived":true,"fork":false,"pushed_at":"2022-10-18T10:09:55.000Z","size":387,"stargazers_count":148,"open_issues_count":0,"forks_count":30,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-07-31T15:02:00.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/cookpad.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":"2014-12-10T06:39:50.000Z","updated_at":"2023-09-28T19:10:01.000Z","dependencies_parsed_at":"2023-01-15T03:46:09.822Z","dependency_job_id":null,"html_url":"https://github.com/cookpad/puree-ios","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookpad%2Fpuree-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookpad%2Fpuree-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookpad%2Fpuree-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cookpad%2Fpuree-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cookpad","download_url":"https://codeload.github.com/cookpad/puree-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222091639,"owners_count":16929668,"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-07-31T15:00:36.446Z","updated_at":"2024-10-29T18:30:15.036Z","avatar_url":"https://github.com/cookpad.png","language":"Objective-C","funding_links":[],"categories":["Libs","Objective-C","Logging","Logging [🔝](#readme)"],"sub_categories":["Logging","Other Hardware"],"readme":"# ⚠️ Obsoleted\n\"Puree\" is no longer supported. Check out new version \"Puree-Swift\" https://github.com/cookpad/Puree-Swift \n\nPuree\n========\n\n[![Version](https://img.shields.io/cocoapods/v/Puree.svg?style=flat)](http://cocoadocs.org/docsets/Puree)\n[![License](https://img.shields.io/cocoapods/l/Puree.svg?style=flat)](http://cocoadocs.org/docsets/Puree)\n[![Platform](https://img.shields.io/cocoapods/p/Puree.svg?style=flat)](http://cocoadocs.org/docsets/Puree)\n[![Travis](https://img.shields.io/travis/cookpad/puree-ios.svg?maxAge=2592000)]()\n\n## Description\n\nPuree is a log collector which provides some features like below\n\n- Filtering: Enable to interrupt process before sending log. You can add common params to logs, or the sampling of logs.\n- Buffering: Store logs to buffer until log was sent.\n- Batching: Enable to send logs by 1 request.\n- Retrying: Retry to send logs after backoff time automatically if sending logs fails.\n\n![](./images/overview.png)\n\nPuree helps you unify your logging infrastructure.\n\n## Usage\n\n### Configure Logger\n\n```swift\n// Swift\n\nlet configuration = PURLoggerConfiguration.default()\nconfiguration.filterSettings = [\n    PURFilterSetting(filter: ActivityFilter.self, tagPattern: \"activity.**\"),\n    // filter settings ...\n]\nconfiguration.outputSettings = [\n    PUROutputSetting(output: ConsoleOutput.self,   tagPattern: \"activity.**\"),\n    PUROutputSetting(output: ConsoleOutput.self,   tagPattern: \"pv.**\"),\n    PUROutputSetting(output: LogServerOutput.self, tagPattern: \"pv.**\", settings:[PURBufferedOutputSettingsFlushIntervalKey: 10]),\n    // output settings ...\n]\n\nlet logger = PURLogger(configuration: configuration)\n```\n\n```objective-c\n// Objective-C\n\nPURLoggerConfiguration *configuration = [PURLoggerConfiguration defaultConfiguration];\nconfiguration.filterSettings = @[\n    [[PURFilterSetting alloc] initWithFilter:[ActivityFilter class]\n                                  tagPattern:@\"activity.**\"],\n    // filter settings ...\n];\nconfiguration.outputSettings = @[\n    [[PUROutputSetting alloc] initWithOutput:[ConsoleOutput class]\n                                  tagPattern:@\"activity.**\"],\n    [[PUROutputSetting alloc] initWithOutput:[ConsoleOutput class]\n                                  tagPattern:@\"pv.**\"],\n    [[PUROutputSetting alloc] initWithOutput:[LogServerOutput class]\n                                  tagPattern:@\"pv.**\"\n                                  settings:@{PURBufferedOutputSettingsFlushIntervalKey: @10}],\n    // output settings ...\n];\n\nPURLogger *logger = [[PURLogger alloc] initWithConfiguration:configuration];\n```\n\nExpected result\n\n```\ntag name                 [ Filter Plugin ]  -\u003e [ Output Plugin ]\n-----------------------------------------------------------------\nactivity.recipe.view  -\u003e [ ActivityFilter ] -\u003e [ ConsoleOutput ]\nactivity.bargain.view -\u003e [ ActivityFilter ] -\u003e [ ConsoleOutput ]\npv.recipe_detail      -\u003e ( no filter )      -\u003e [ ConsoleOutput ], [ LogServerOutput(FlushInterval:10sec) ]\nevent.special         -\u003e ( no filter )      -\u003e ( no output )\n```\n\n### Post log\n\nPost log object(anyObject) in an arbitrary timing.\n\n```swift\n// Swift\n\nlogger.post([\"recipe_id\": \"123\"], tag: \"pv.recipe_detail\")\n```\n\n```objective-c\n// Objective-C\n\n[logger postLog:@{@\"recipe_id\": @\"123\"} tag: @\"pv.recipe_detail\"]\n```\n\n### Plugins\n\nYou can create plugins. See [Create Plugins](https://github.com/cookpad/puree-ios/wiki/Create-plugins)\n\n## Tag system\n\n### Tag\n\nTag is consisted of multiple term split by `.`.\nFor example `activity.recipe.view`, `pv.recipe_detail`.\nYou can specify tag to log freely.\n\n### Pattern\n\nFilter, Output and BufferedOutput plugins is applied to tag matched logs.\nYou can specify tag pattern for plugin reaction rules.\n\n#### Simple pattern\n\nPattern `aaa.bbb` match tag `aaa.bbb`, not match tag `aaa.ccc` (Perfect matching).\n\n#### Wildcard\n\nPattern `aaa.*` match tags `aaa.bbb`, `aaa.ccc`. Not match tags `aaa`, `aaa.bbb.ccc` (single term).\n\nPattern `aaa.**` match tags `aaa`, `aaa.bbb` and `aaa.bbb.ccc`. Not match tag `xxx.yyy.zzz` (zero or more terms).\n\n## Installation\n\nPuree is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n    pod \"Puree\"\n\n## Author\n\nTomohiro Moro, tomohiro-moro@cookpad.com\n\n## License\n\nPuree is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookpad%2Fpuree-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcookpad%2Fpuree-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcookpad%2Fpuree-ios/lists"}