Timber v1.0.5 Timber
The functions in this module work by modifying the Logger metadata store which is unique to every BEAM process. This is convenient in many ways. First and foremost, it does not require you to manually manage the metadata. Second, because we conform to the standard Logger principles, you can utilize Timber alongside other Logger backends without issue. Timber prefixes its contextual metadata keys so as not to interfere with other systems.
The Context Stack
Summary
Functions
Adds a context entry to the stack
Used to time runtime execution. For example, when timing a Timber.Events.HTTPClientRequestEvent
Functions
Adds a context entry to the stack
Used to time runtime execution. For example, when timing a Timber.Events.HTTPClientRequestEvent
:
timer = Timber.start_timer()
# .... make request
event = HTTPClientResponseEvent.new(status: 200, timer: timer) # automatically sets :time_ms
message = HTTPClientResponseEvent.message(event)
Logger.info(message, event: event)