Timber v2.3.4 API Reference
Modules
The functions in this module are high level convenience functions instended to define the broader / public API of the Timber library. It is recommended to use these functions instead of their deeper counterparts
The ContextEntry module formalizes the structure of context stack entries
The CustomContext
allows you to track contextual information relevant to your
system that is not one of the commonly supported contexts for Timber (Timber.Contexts.*
)
The HTTP context tracks information about an HTTP request currently being handled
The job context tracks the execution of background jobs or any isolated task with a reference. Add it like
The organization context tracks the organization of the currently authenticated user
The Runtime context tracks information about the current runtime, such as the module, file, function, and line number that called the log line
The Session context tracks the current session. It it’s a way to track users without the need for authentication
The system context tracks OS level information, such as the process ID and hostname
The User context tracks the currently authenticated user and allows you to tail indibidual user in the Timber console
Represents the current context stored in the Elixir.Logger
metadata.
This module’s sole purposes is to load and persist context from that metadata.
The actual context data structure is defined and managed in Timber.Context
A common interface for working with structures in the Timber.Events
namespace
The ControllerCallEvent
represents a controller being called during the HTTP request
cycle
The CustomEvent
represents events that aren’t covered elsewhere
The ErrorEvent
is used to track errors and exceptions
The HTTPClientRequestEvent
tracks outgoing HTTP requests giving you structured insight
into communication with external services
The HTTPClientResponseEvent
tracks responses for outgoing HTTP requests. This gives you
structured insight into communication with external services
The HTTPServerRequestEvent
tracks incoming HTTP requests. This gives you structured
insight into the HTTP requests coming into your app
The HTTPServerResponseEvent
tracks responses for incoming HTTP requests. In other words,
the resposnes you are sending back to your clients. This gives you structured insight into
the response you are sending back to your clients
The SQLQueryEvent
tracks outgoing SQL queries. This gives you structured insight into
SQL query performance within your application
The TemplateRenderEvent
trackes template rendering within your app. Giving you structured
insight into template rendering performance
Provides utilities for formatting log lines as text
An efficient HTTP client that leverages hackney, keep alive connections, and connection pools to communicate with the Timber API
Deprecated
Timber integration for Ecto
Automatically logs metadata information about HTTP requests and responses in Plug-based frameworks like Phoenix
Automatically captures the HTTP method, path, and request_id in Plug-based frameworks like Phoenix and adds it to the context
Handles instrumentation of Phoenix.Endpoint
Automatically tracks the session in Plug-based frameworks like Phoenix and adds it to the context
The LogEntry module formalizes the structure of every log entry
Provides a logger backend that dispatches logs via HTTP
Exceptions
Protocols
Converts a data structure into a Timber.Context.t
. This is called on any data structure passed
in the Timber.add_context/1
function
Converts a data structure into a Timber.Event.t
. This is called on any data structure passed
in the :event
metadata key passed to Logger