Skip to content

Commit

Permalink
Added OkLog-iOS to README
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpercic committed Jul 9, 2018
1 parent d5882e2 commit af089b4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# OkLog

Network logging interceptor for OkHttp.
Logs an URL link with encoded network call data for every OkHttp call.

Expand All @@ -26,7 +25,6 @@ All the existing URLs generated by OkLog will still continue to work, as long as


## Motivation

Debugging Android responses should be easier. Even with Retrofit logging enabled, copying multi-line responses from logcat is cumbersome and annoying.

OkLog writes a clickable link to the (Android) log with the OkHttp's response info as params. Clicking on the link in logcat opens your browser with the [detailed response info](#additional-log-data-options).
Expand All @@ -40,7 +38,6 @@ See an example [in action](http://oklog.responseecho.com/v1/r/H4sIAAAAAAAAAKtWyk


## How does it work?

OkLog intercepts responses from OkHttp, it then gzips and Base64 encodes the network response & the detailed response info and generates an url link with the encoded data as params. It then logs the url using:
- [Timber](https://github.com/JakeWharton/timber) OR
- Android's built-in logger (if your project does not include Timber) OR
Expand All @@ -53,7 +50,6 @@ That url points to a hosted instance of the [ResponseEcho](https://github.com/si
## Usage

### OkLog for OkHttp (use for Retrofit 1.x)

Add using Gradle:
```groovy
compile 'com.github.simonpercic:oklog:2.3.0'
Expand Down Expand Up @@ -129,7 +125,6 @@ new Retrofit.Builder()
```

### Builder options

- `setBaseUrl(String url)`
Set the base url to prefix the logs with. Useful if you're self-hosting [ResponseEcho](https://github.com/simonpercic/ResponseEcho).
Defaults to a hosted Heroku instance at: 'http://oklog.responseecho.com'
Expand All @@ -145,7 +140,6 @@ new Retrofit.Builder()
Since Timber is an optional dependency, OkLog will use it only if it's included it in your app's dependencies. If not, it will fallback to using Android's built-in Log methods.

#### Additional log data options

method | description | included by default
----------------------------------|-------------------------------|------------------------------
withRequestBody(boolean) |Include request body |✓ true
Expand Down Expand Up @@ -199,7 +193,6 @@ This library optionally uses [Timber](https://github.com/JakeWharton/timber) for


## ProGuard

ProGuard configuration is already bundled with OkLog/3, so you can safely use it with ProGuard.


Expand Down Expand Up @@ -227,10 +220,13 @@ There are two analytics methods included:
In either of these methods, NO response data is included in the analytics tracking.


## iOS
If you'd want to use OkLog in an iOS project, check out [OkLog-iOS](https://github.com/diegotl/OkLog-iOS), implemented by [Diego Trevisan](https://github.com/diegotl).


## Change Log
See [CHANGELOG.md](CHANGELOG.md)


## License

Open source, distributed under the MIT License. See [LICENSE](LICENSE) for details.

0 comments on commit af089b4

Please sign in to comment.