EventLogger

open 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).

Author

truggles

Constructors

Link copied to clipboard
constructor(emitterValue: EventEmitter, verboseValue: Boolean)
Creates a new EventLogger object.
constructor(emitterValue: EventEmitter, verboseValue: Boolean, callback: EventLogger.LoggerCallback)
Creates a new EventLogger object.
constructor(emitterValue: EventEmitter, verboseValue: Boolean, tagValue: String)
Creates a new EventLogger object.
constructor(emitterValue: EventEmitter, verboseValue: Boolean, tagValue: String, callback: EventLogger.LoggerCallback)
Creates a new EventLogger object.

Types

Link copied to clipboard
interface LoggerCallback
This interface provides a way implement alternative logging.

Functions

Link copied to clipboard
open fun addExclude(value: String)
By passing this method a specific EventType, that type will not be logged.
Link copied to clipboard
open fun addWhitelist(value: String)
Adds a specific EventType to the whitelist.
Link copied to clipboard
open fun clearExcludes()
Removes all EventType added with addExclude.
Link copied to clipboard
open fun clearWhitelist()
Removes all EventType types registered with the whitelist.
Link copied to clipboard
open fun removeExclude(value: String)
Removes an EventType that was previously added with addExclude.
Link copied to clipboard
open fun removeFromWhitelist(value: String)
Removes a specific EventType from the whitelist.
Link copied to clipboard
open fun setVerbose(value: Boolean)
Sets whether or not properties on events should be logged.
Link copied to clipboard
open fun start()
Link copied to clipboard
open fun stop()
Stops writing log messages.