package com.example.puree.logs;

import android.content.Context;

import com.cookpad.puree.Puree;
import com.cookpad.puree.PureeConfiguration;
import com.cookpad.puree.PureeFilter;
import com.cookpad.puree.plugins.OutBufferedLogcat;
import com.cookpad.puree.plugins.OutLogcat;
import com.example.puree.AddEventTimeFilter;
import com.example.puree.logs.filters.SamplingFilter;
import com.example.puree.logs.plugins.OutBufferedDisplay;
import com.example.puree.logs.plugins.OutDisplay;

public class PureeConfigurator {
    public static void configure(Context context) {
        Puree.initialize(buildConf(context));
    }

    public static PureeConfiguration buildConf(Context context) {
        PureeFilter addEventTimeFilter = new AddEventTimeFilter();
        return new PureeConfiguration.Builder(context)
                .registerOutput(new OutLogcat(), addEventTimeFilter)
                .registerOutput(new OutBufferedLogcat(), addEventTimeFilter)
                .registerOutput(new OutDisplay(), new SamplingFilter(0.5F))
                .registerOutput(new OutBufferedDisplay())
                .build();
    }
}

@@ -319,62 +319,8 @@
 er;%0A
-import com.example.puree.logs.filters.SamplingFilter;%0A
 impo
@@ -888,32 +888,84 @@
 ventTimeFilter)%0A
+                .registerOutput(new OutDisplay())%0A//
                 
@@ -1023,16 +1023,41 @@
 r(0.5F))
+ // you can sampling logs
 %0A       

Update configuration