Timber v0.4.5 Timber.Events.CustomEvent
Allows for custom events that aren’t covered elsewhere.
Custom events can be used to encode information about events that are central to your line of business like receiving credit card payments, adding products to a card, saving a draft of a post, or changing a user’s password.
Fields
name
- This is the name of your event. This can be anything that adheres to theString.Chars' protocol. It will be used to identify this event on the Timber interface. Example:
:my_eventor or
MyEvent. At Timber we like to reserve CamelCase events for actual modules and snake_case events for inline events. *
data- A map of data. This can be anything that implemented the [
Poison.Encoder](https://hexdocs.pm/poison/2.2.0/Poison.Encoder.html) protocol. That is, anything that can be JSON encoded. example:
%{key: “value”}*
time_ms- A fractional float represented the execution time in milliseconds. example:
45.6## Examples Please see [
Timber.Event`](Timber.Event.html) for examples on passing custom event information.
Summary
Functions
Callback implementation for Timber.Event.message/1
Creates a new custom event. Takes any of the fields described in the module docs as keys
Types
Functions
Callback implementation for Timber.Event.message/1
.