Timber v0.1.2 Timber.Logger
The Logger module is at the heart of Timber’s integration. It specifies
a backend that can be used with the standard Logger
application distributed
with Elixir.
This module integrates with the transport mechanism you specify, and is responsible for receiving log events, determining whether the event is appropriate to output, and compiling the context data. Individual transports are responsible for maintaining buffers and whether the output should be asynchronous or synchronous.
Summary
Types
The level of a log event is described as an atom
The message for a log event is given as IO.chardata. It is important not
to assume the message will be a String.t/0
The precision of the microsecond represents the precision with which the fractional seconds are kept
A representation of stateful data for this module
Time is represented both to the millisecond and to the microsecond with precision
Types
The level of a log event is described as an atom
The message for a log event is given as IO.chardata. It is important not
to assume the message will be a String.t/0
The precision of the microsecond represents the precision with which the fractional seconds are kept.
See Calendar.microsecond/0
for more information.
t :: %Timber.Logger{min_level: level | nil, transport: module, transport_state: Timber.Transport.state}
A representation of stateful data for this module
min_level
The minimum level to be logged. The Elixir Logger
module typically
handle filtering the log level, however this is a stop-gap for direct
testing as well as any custom levels.
transport
The transport module as an atom. This will be fetched at startup from the configuration.
transport_state
The transport state. This is initialized by calling init/1
on the
transport with transport configuration data from the application
config.
time :: {hour, minute, second, millisecond} | {hour, minute, second, {microsecond, precision}}
Time is represented both to the millisecond and to the microsecond with precision.