/*
 * Copyright (C) 2015 Pedro Vicente Gomez Sanchez.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.pedrovgs.sample;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import com.github.pedrovgs.lynx.LynxActivity;
import com.github.pedrovgs.lynx.LynxConfig;

public class MainActivity extends ActionBarActivity {

  private static final int MAX_TRACES_TO_SHOW = 3000;

  @Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Button bt_show_logcat_view = (Button) findViewById(R.id.bt_show_lynx_view);
    bt_show_logcat_view.setOnClickListener(new View.OnClickListener() {

      @Override public void onClick(View v) {
        Context context = MainActivity.this;
        LynxConfig lynxConfig = new LynxConfig();
        lynxConfig.withMaxNumberOfTracesToShow(MAX_TRACES_TO_SHOW);
        Intent lynxActivityIntent = LynxActivity.getIntent(context, lynxConfig);
        startActivity(lynxActivityIntent);
      }
    });
  }
}

@@ -777,24 +777,49 @@
 arActivity;%0A
+import android.util.Log;%0A
 import andro
@@ -832,16 +832,16 @@
 w.View;%0A
-
 import a
@@ -951,16 +951,41 @@
 xConfig;
+%0Aimport java.util.Random;
 %0A%0Apublic
@@ -1086,16 +1086,127 @@
  = 3000;
+%0A  private Thread logGeneratorThread;%0A  private boolean continueReading = true;%0A  private int traceCounter = 0;
 %0A%0A  @Ove
@@ -1847,15 +1847,1326 @@
   %7D%0A
-
     %7D);
+%0A%0A    generateFiveRandomTracesPerSecond();%0A  %7D%0A%0A  @Override protected void onDestroy() %7B%0A    super.onDestroy();%0A    continueReading = false;%0A  %7D%0A%0A  private void generateFiveRandomTracesPerSecond() %7B%0A    final Random random = new Random();%0A    logGeneratorThread = new Thread(new Runnable() %7B%0A      @Override public void run() %7B%0A        while (continueReading) %7B%0A          int traceLevel = random.nextInt(6);%0A          switch (traceLevel) %7B%0A            case 0:%0A              Log.v(%22Lynx%22, traceCounter + %22 - Verbose trace generated automatically%22);%0A              break;%0A            case 2:%0A              Log.d(%22Lynx%22, traceCounter + %22 - Debug trace generated automatically%22);%0A              break;%0A            case 3:%0A              Log.w(%22Lynx%22, traceCounter + %22 - Warning trace generated automatically%22);%0A              break;%0A            case 4:%0A              Log.e(%22Lynx%22, traceCounter + %22 - Error trace generated automatically%22);%0A              break;%0A            case 5:%0A              Log.wtf(%22Lynx%22, traceCounter + %22 - WTF trace generated automatically%22);%0A              break;%0A          %7D%0A          traceCounter++;%0A          try %7B%0A            Thread.sleep(200);%0A          %7D catch (InterruptedException e) %7B%0A            e.printStackTrace();%0A          %7D%0A        %7D%0A      %7D%0A    %7D);%0A    logGeneratorThread.start();
 %0A  %7D

Add random traces generator to main activity. When MainActivity is open, this code is going to generate 5 traces per second using random values