Constructor
new mw.eventLog.Schema(name, samplingRate, defaults)
#
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
string | Schema name to log to. |
||
samplingRate |
number |
optional |
1 | The rate at which sampling is performed. The values are between 0 and 1 inclusive. |
defaults |
Object |
optional |
A set of defaults to log to the schema. Once these defaults are set the values will be logged along with any additional fields that are passed to the log method. |
- Source:
Methods
log(data, samplingRate)
#
Log an event via the EventLogging subscriber.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
Object | Data to log |
|
samplingRate |
number |
optional |
Number between 0 and 1.
Defaults to |
- Source:
Log an event via the EventLogging subscriber.