Package 

Class EventLogger


  • 
    public class EventLogger
    
                        

    Simple class that can be used to listen to and log out information on all emitted events. By default the BUFFERED_UPDATE, PROGRESS and AD_PROGRESS events are excluded because they are extremely chatty. They can be displayed by calling removeExclude(type).

    • Constructor Detail

      • EventLogger

        EventLogger(EventEmitter emitterValue, boolean verboseValue)
        Creates a new EventLogger object.
        Parameters:
        emitterValue - The EventEmitter object to listen for events to log.
        verboseValue - If true, will log all the properties for each event.
      • EventLogger

        EventLogger(EventEmitter emitterValue, boolean verboseValue, String tagValue)
        Creates a new EventLogger object.
        Parameters:
        emitterValue - The EventEmitter object to listen for events to log.
        verboseValue - If true, will log all the properties for each event.
        tagValue - The name of the tag to use when writing messages to logcat.
    • Method Detail

      • setVerbose

         void setVerbose(boolean value)

        Sets whether or not properties on events should be logged.

        Parameters:
        value - If true, will log all properties.
      • stop

         void stop()

        Stops writing log messages.

      • addExclude

         void addExclude(String value)

        By passing this method a specific EventType, that type will not be logged.

        Parameters:
        value - The EventType to exclude from the log.
      • addWhitelist

         void addWhitelist(String value)

        Adds a specific EventType to the whitelist. If EventTypes are added to the whitelist, ONLY thoseEventTypes will be logged. All other Events will be ignored. By default, no EventTypes are whitelisted.

        Parameters:
        value - The EventType to add to the whitelist.
      • clearWhitelist

         void clearWhitelist()

        Removes all EventType types registered with the whitelist. After calling this, all EventTypes will belogged (except those registered with addExclude.