{"id":13803788,"url":"https://github.com/android10/frodo","last_synced_at":"2025-10-07T20:22:20.415Z","repository":{"id":144339891,"uuid":"43031095","full_name":"android10/frodo","owner":"android10","description":"Android Library for Logging RxJava Observables and Subscribers.","archived":false,"fork":false,"pushed_at":"2018-08-30T23:39:05.000Z","size":231,"stargazers_count":1472,"open_issues_count":16,"forks_count":103,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-02T06:16:58.452Z","etag":null,"topics":["android","android-development","android-library","debugger","debugging","debugging-tool","rxjava"],"latest_commit_sha":null,"homepage":"","language":"Java","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/android10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","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}},"created_at":"2015-09-23T22:39:41.000Z","updated_at":"2025-02-28T06:56:04.000Z","dependencies_parsed_at":"2023-07-29T04:00:41.361Z","dependency_job_id":null,"html_url":"https://github.com/android10/frodo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Ffrodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Ffrodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Ffrodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/android10%2Ffrodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/android10","download_url":"https://codeload.github.com/android10/frodo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"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":["android","android-development","android-library","debugger","debugging","debugging-tool","rxjava"],"created_at":"2024-08-04T01:00:37.912Z","updated_at":"2025-10-07T20:22:15.372Z","avatar_url":"https://github.com/android10.png","language":"Java","readme":"\n\nFrodo \n=========================\n\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0) [![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n[![Download](https://api.bintray.com/packages/android10/maven/frodo-plugin/images/download.svg) ](https://bintray.com/android10/maven/frodo-plugin/_latestVersion)\n\n```Frodo``` is an android library inspired by Jake Wharton's [Hugo](https://github.com/JakeWharton/hugo), mainly used for logging [RxJava](https://github.com/ReactiveX/RxJava) [Observables](http://reactivex.io/documentation/observable.html) and [Subscribers](http://reactivex.io/RxJava/javadoc/rx/Subscriber.html) outputs on the logcat.\nIt generates and weaves code based on annotations only on ```debug``` versions of the application where the plugin is applied, for instance, it is safe to persist any ```Frodo``` annotation in the codebase.\n\n![frodo_hug](https://cloud.githubusercontent.com/assets/1360604/10925718/e7ea4318-8290-11e5-91b4-f2bfbde65319.gif)\n\nMain Features\n=========================\n\n- **@RxLogObservable:** Annotated methods which return ```rx.Observables``` will print the following information when emitting items:\n\n\u003cimg width=\"767\" alt=\"frodo_observable\" src=\"https://cloud.githubusercontent.com/assets/1360604/10925000/ee937c08-828a-11e5-97ac-bb13b7d469f8.png\"\u003e\n\n```java\n    @RxLogObservable\n    public Observable\u003cList\u003cMyDummyClass\u003e\u003e list() {\n        return Observable.just(buildDummyList());\n    }\n```\n\n- **@RxLogObservable.Scope Options:** It is possible to narrow down the debug information shown by adding a debugging scope to @RxLogObservable annotation. \n\n     -  **Scope.EVERYTHING:** Logs stream data, schedulers and rx.Observable events. Default.\n     -  **Scope.STREAM:** Logs rx.Observable emitted items plus total execution time.\n     -  **Scope.SCHEDULERS:** Logs schedulers where the annotated rx.Observable operates on.\n     -  **Scope.EVENTS:** Logs rx.Observable events only.\n     -  **Scope.NOTHING:** Turns off logging for the annotated rx.Observable.\n\n```java\n    @RxLogObservable(Scope.STREAM)\n    public Observable\u003cList\u003cMyDummyClass\u003e\u003e list() {\n        return Observable.just(buildDummyList());\n    }\n```\n\n- **@RxLogSubscriber:** Annotated classes which are of type ```rx.Subscriber``` will print the following information when receiving items from an ```rx.Observable```:\n\n\u003cimg width=\"980\" alt=\"frodo_subscriber\" src=\"https://cloud.githubusercontent.com/assets/1360604/10925010/fa76523e-828a-11e5-8607-1611aef61add.png\"\u003e\n\n```java\n@RxLogSubscriber\npublic class MySubscriberBackpressure extends Subscriber\u003cInteger\u003e {\n\n    @Override\n    public void onStart() {\n        request(40);\n    }\n\n    @Override\n    public void onNext(Integer value) {\n        //empty\n    }\n\n    @Override\n    public void onError(Throwable throwable) {\n        //empty\n    }\n\n    @Override\n    public void onCompleted() {\n        if (!isUnsubscribed()) {\n            unsubscribe();\n        }\n    }\n}\n```\n\nEnabling Frodo\n=========================\nTo enable Frodo, a gradle plugin must be applied in your ```build.gradle```:\n\n```java\nbuildscript {\n  repositories {\n    jcenter()\n  }\n  dependencies {\n    classpath \"com.fernandocejas.frodo:frodo-plugin:${latest_version}\"\n  }\n}\n\napply plugin: 'com.android.application'\napply plugin: 'com.fernandocejas.frodo'\n\n//By default frodo is ON on debug build variants, although\n//we can enable-disable it with this configuration.\nfrodo {\n  enabled = true\n}\n```\n\nKnown issues\n=========================\n\n1 - Multi module setup (application + android library) will not log annotated methods/classes from Android Library Module but will do it on Android Application Module. The reason behind this, is that the Android Gradle Plugin will build all Android Libraries as release versions, for instance, Frodo is not able to weave any code on the annotated methods/classes (Remember that only weaves in debug versions). There is a workaround for forcing debug versions of your Android Libraries (just be careful in case this is forgotten and you end up shipping a version of your app with RxJava Logging enabled) by adding this line in your ```build.gradle``` file:\n\n```java\nandroid {\n  defaultPublishConfig \"debug\"\n}\n```\n\nFrodo WIKI\n=========================\nFor complete information, features and usage, refer to the [WIKI](https://github.com/android10/frodo/wiki):\n- [@RxLogObservable](https://github.com/android10/frodo/wiki/@RxLogObservable)\n- [@RxLogSubscriber](https://github.com/android10/frodo/wiki/@RxLogSubscriber)\n- [Release Notes](https://github.com/android10/frodo/wiki/Release-Notes)\n- [Development](https://github.com/android10/frodo/wiki/Development)\n- [Frodo under the hoods](https://github.com/android10/frodo/wiki/Under-the-hoods)\n\nLicense\n=========================\n\n    Copyright 2015 Fernando Cejas\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n![http://www.fernandocejas.com](https://github.com/android10/Sample-Data/blob/master/android10/android10_logo_big.png)\n\n\u003ca href=\"https://www.buymeacoffee.com/android10\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: auto !important;width: auto !important;\" \u003e\u003c/a\u003e\n","funding_links":["https://www.buymeacoffee.com/android10"],"categories":["Library","rxjava","Utilities"],"sub_categories":["一些原理分析的文章"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid10%2Ffrodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroid10%2Ffrodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroid10%2Ffrodo/lists"}