Android Open Source - CustomersChoice Log Reporter






From Project

Back to project page CustomersChoice.

License

The source code is released under:

Apache License

If you think the Android project CustomersChoice listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.alosdev.android.customerschoice.reporter;
//from w  w w  .j  av  a 2  s  . c  o  m
import de.alosdev.android.customerschoice.Variant;
import de.alosdev.android.customerschoice.logger.Logger;


/**
 * This {@link Reporter} logs the reporting to the given reporter
 * @author Hasan Hosgel
 *
 */
public class LogReporter implements Reporter {
  private static final String TAG = "LogReporter";
  private final Logger logger;

  public LogReporter(Logger logger) {
    if (null == logger) {
      throw new IllegalArgumentException("the Logger must be not NULL");
    }
    this.logger = logger;
  }

  @Override
  public void startVariant(Variant variant) {
    logger.i(TAG, "start variant (", variant.name, ") with follogin case: ", variant.currentVariant);
  }

  @Override
  public void reachesGoal(Variant variant) {
    logger.i(TAG, "reached goal for variant (", variant.name, ") with following case: ", variant.currentVariant);
  }
}




Java Source Code List

de.alosdev.android.customerschoice.CustomersChoice.java
de.alosdev.android.customerschoice.VariantBuilder.java
de.alosdev.android.customerschoice.Variant.java
de.alosdev.android.customerschoice.broadcast.OverwriteVariantBroadCastReceiver.java
de.alosdev.android.customerschoice.demo.CustomersChoiceApplication.java
de.alosdev.android.customerschoice.demo.CustomersChoiceDemo.java
de.alosdev.android.customerschoice.demo.ShoppingCardActivity.java
de.alosdev.android.customerschoice.logger.AndroidLogger.java
de.alosdev.android.customerschoice.logger.ChainedLogger.java
de.alosdev.android.customerschoice.logger.Logger.java
de.alosdev.android.customerschoice.logger.NoLogger.java
de.alosdev.android.customerschoice.reporter.ChainedReporter.java
de.alosdev.android.customerschoice.reporter.LogReporter.java
de.alosdev.android.customerschoice.reporter.NoReporter.java
de.alosdev.android.customerschoice.reporter.Reporter.java