puree-android | A log collector for Android

 by   cookpad Java Updated: 8 months ago - 4.1.7 License: MIT

Download this library from

Build Applications

kandi X-RAY | puree-android REVIEW AND RATINGS

Puree is a log collector which provides the following features:. Puree helps you unify your logging infrastructure.


  • puree-android has a low active ecosystem.
  • It has 468 star(s) with 64 fork(s).
  • It had no major release in the last 12 months.
  • On average issues are closed in 66 days.
  • It has a neutral sentiment in the developer community.

quality kandi

  • puree-android has 4 bugs (0 blocker, 0 critical, 2 major, 2 minor) and 83 code smells.


  • puree-android has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • puree-android code analysis shows 0 unresolved vulnerabilities.
  • There are 1 security hotspots that need review.


  • puree-android is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.


  • puree-android releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • puree-android saves you 1004 person hours of effort in developing the same functionality from scratch.
  • It has 2281 lines of code, 227 functions and 59 files with 0 % test coverage
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA

kandi has reviewed puree-android and discovered the below as its top functions. This is intended to give you an instant insight into puree-android implemented functionality, and help decide if they suit your requirements.

  • Deletes all records from disk .
  • Tries to find the process name in the current process
  • helper method to set the selected action on a menu item
  • Sends a log message
  • Initializes the activity .
  • Build configuration .
  • Filter output .
  • Apply filters to log
  • Run the engine .
  • Gets the IDs as a string .

puree-android Key Features

Filtering: Enable to interrupt process before sending log. You can add common params to logs, or the sampling of logs.

Buffering: Store logs to buffers and send them later.

Batching: Send logs in a single request with PureeBufferedOutput.

Retrying: Retry to send logs after backoff time if sending logs fails.

puree-android examples and code snippets

  • Installation
  • Initialize
  • Definition of PureeLog objects
  • Definition of PureeOutput plugins
  • Definition of Filters
  • Purging old logs


// build.gradle
buildscript {
    repositories {
        maven { url 'https://jitpack.io' }

// app/build.gradle
dependencies {
    implementation "com.github.cookpad:puree-android:$latestVersion"


public class MyApplication extends Application {
    public void onCreate() {

    public static PureeConfiguration buildConfiguration(Context context) {
        PureeFilter addEventTimeFilter = new AddEventTimeFilter();
        return new PureeConfiguration.Builder(context)
                .pureeSerializer(new PureeGsonSerializer())
                .executor(Executors.newScheduledThreadPool(1)) // optional
                .register(ClickLog.class, new OutLogcat())
                .register(ClickLog.class, new OutBufferedLogcat().withFilters(addEventTimeFilter))

Definition of PureeLog objects

public class PureeGsonSerializer implements PureeSerializer {
    private Gson gson = new Gson();

    public String serialize(Object object) {
        return gson.toJson(object);

Definition of PureeOutput plugins

public class OutLogcat extends PureeOutput {
    private static final String TYPE = "out_logcat";

    public String type() {
        return TYPE;

    public OutputConfiguration configure(OutputConfiguration conf) {
        return conf;

    public void emit(String jsonLog) {
        Log.d(TYPE, jsonLog);

Definition of Filters

public class AddEventTimeFilter implements PureeFilter {
    public JsonObject apply(String jsonLog) {
        JsonObject jsonObject = new JsonParser().parse(jsonLog).getAsJsonObject();
        jsonObject.addProperty("event_time", System.currentTimeMillis());
        return jsonOabject.toString();

Purging old logs

public class OutPurge extends PureeBufferedOutput {

    // ..

    public OutputConfiguration configure(OutputConfiguration conf) {
        // set to purge buffered logs older than 2 weeks
        conf.setPurgeAgeMillis(2 * 7 * 24 * 60 * 60 * 1000);
        return conf;


No Community Discussions are available at this moment for puree-android.Refer to stack overflow page for discussions.

No Community Discussions are available at this moment for puree-android.Refer to stack overflow page for discussions.

Community Discussions, Code Snippets contain sources that include Stack Exchange Network


No vulnerabilities reported

INSTALL puree-android

This is published on jitpack and you can use Puree as:.


For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

Implement puree-android faster with kandi.

  • Use the support, quality, security, license, reuse scores and reviewed functions to confirm the fit for your project.
  • Use the, Q & A, Installation and Support guides to implement faster.

Discover Millions of Libraries and
Pre-built Use Cases on kandi