Tabnine Logo
EventLogListener
Code IndexAdd Tabnine to your IDE (free)

How to use
EventLogListener
in
com.orhanobut.tracklytics

Best Java code snippets using com.orhanobut.tracklytics.EventLogListener (Showing top 2 results out of 315)

origin: orhanobut/tracklytics

private void log(Event event) {
 if (logger == null) return;
 @SuppressWarnings("StringBufferReplaceableByString")
 StringBuilder builder = new StringBuilder()
   .append(event.name)
   .append("-> ")
   .append(event.attributes.toString())
   .append(", super attrs: ")
   .append(superAttributes.toString())
   .append(", filters: ")
   .append(Arrays.toString(event.filters));
 logger.log(builder.toString());
}
origin: orhanobut/tracklytics

 @Test public void log() throws Throwable {
  EventLogListener logger = mock(EventLogListener.class);
  tracklytics.setEventLogListener(logger);

  Map<String, Object> attributes = new HashMap<>();
  attributes.put("key", "value");

  tracklytics.trackEvent("event", attributes);

  verify(logger).log("event-> {key=value}, super attrs: {}, filters: null");
 }
}
com.orhanobut.tracklyticsEventLogListener

Javadoc

Subscribe to the pre-formatted log message stream. Once there is a subscriber, log message will be sent through this interface

Most used methods

  • log

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • JTextField (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now