public class EventLogger
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
EventLogger.LoggerCallback
This interface provides a way implement alternative logging.
|
| Constructor and Description |
|---|
EventLogger(EventEmitter emitterValue,
boolean verboseValue)
Creates a new EventLogger object.
|
EventLogger(EventEmitter emitterValue,
boolean verboseValue,
EventLogger.LoggerCallback callback)
Creates a new EventLogger object.
|
EventLogger(EventEmitter emitterValue,
boolean verboseValue,
java.lang.String tagValue)
Creates a new EventLogger object.
|
EventLogger(EventEmitter emitterValue,
boolean verboseValue,
java.lang.String tagValue,
EventLogger.LoggerCallback callback)
Creates a new EventLogger object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExclude(java.lang.String value)
By passing this method a specific
EventType, that type will not be logged. |
void |
addWhitelist(java.lang.String value)
Adds a specific
EventType to the whitelist. |
void |
clearExcludes()
Removes all
EventType added with addExclude(String). |
void |
clearWhitelist()
Removes all
EventType types registered with the whitelist. |
void |
removeExclude(java.lang.String value)
Removes an
EventType that was previously added with addExclude(String). |
void |
removeFromWhitelist(java.lang.String value)
Removes a specific
EventType from the whitelist. |
void |
setVerbose(boolean value)
Sets whether or not properties on events should be logged.
|
void |
start() |
void |
stop()
Stops writing log messages.
|
public EventLogger(EventEmitter emitterValue, boolean verboseValue)
emitterValue - The EventEmitter object to listen for events to log.verboseValue - If true, will log all the properties for each event.public EventLogger(EventEmitter emitterValue, boolean verboseValue, EventLogger.LoggerCallback callback)
emitterValue - The EventEmitter object to listen for events to log.verboseValue - If true, will log all the properties for each event.callback - A EventLogger.LoggerCallback instance which will be called
when a message or error should be logged.public EventLogger(EventEmitter emitterValue, boolean verboseValue, java.lang.String tagValue)
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.public EventLogger(EventEmitter emitterValue, boolean verboseValue, java.lang.String tagValue, EventLogger.LoggerCallback callback)
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.callback - A EventLogger.LoggerCallback instance which will be called
when a message or error should be logged. This can be null.public void setVerbose(boolean value)
value - If true, will log all properties.public void start()
public void stop()
public void addExclude(java.lang.String value)
EventType, that type will not be logged.value - The EventType to exclude from the log.public void removeExclude(java.lang.String value)
EventType that was previously added with addExclude(String).value - The EventType to remove.public void clearExcludes()
EventType added with addExclude(String).public void addWhitelist(java.lang.String value)
EventType to the whitelist. If EventTypes are added to the whitelist, ONLY those
EventTypes will be logged. All other Events will be ignored. By default, no EventTypes are whitelisted.value - The EventType to add to the whitelist.public void removeFromWhitelist(java.lang.String value)
EventType from the whitelist.value - The EventType to remove.public void clearWhitelist()
EventType types registered with the whitelist. After calling this, all EventTypes will be
logged (except those registered with addExclude(String).