lager (lager v0.1.0) View Source

Link to this section Summary

Functions

Backwards compatible with beams compiled with lager 2.x
Manually log a message into lager without using the parse transform.
Manually log a message into lager without using the parse transform.
Manually log a message into lager without using the parse transform.
Get lager metadata for current process
Set lager metadata for current process. Will badarg if you don't supply a list of {key, value} tuples keyed by atoms.

Link to this section Types

Specs

log_level() :: none | logger:level().

Specs

log_level_number() :: 0..7.

Link to this section Functions

Link to this function

dispatch_log(Severity, MetadataList, Format, Args, TruncSize)

View Source

Specs

dispatch_log(Severity, MetadataList, Format, Args, TruncSize) -> ok
                when
                    Severity :: log_level(),
                    MetadataList :: [{atom(), term()}],
                    Format :: string(),
                    Args :: list(),
                    TruncSize :: non_neg_integer().
Backwards compatible with beams compiled with lager 2.x
Link to this function

dispatch_log(Sink, Severity, MetadataList, Format, Args, TruncSize, Safety)

View Source

Specs

dispatch_log(Sink, Severity, MetadataList, Format, Args, TruncSize, Safety) -> ok | Error
                when
                    Sink :: atom(),
                    Severity :: log_level(),
                    MetadataList :: [{atom(), term()}],
                    Format :: string(),
                    Args :: list(),
                    TruncSize :: non_neg_integer(),
                    Safety :: safe | unsafe,
                    Error :: {error, Reason},
                    Reason :: {bad_sink, Sink}.
Link to this function

dispatch_log(Severity, Module, Function, Line, Pid, MetadataList, Format, Args, TruncSize)

View Source

Specs

dispatch_log(Severity, Module, Function, Line, Pid, MetadataList, Format, Args, TruncSize) -> ok
                when
                    Severity :: log_level(),
                    Module :: module(),
                    Function :: atom(),
                    Line :: pos_integer(),
                    Pid :: pid(),
                    MetadataList :: [{atom(), term()}],
                    Format :: string(),
                    Args :: list(),
                    TruncSize :: non_neg_integer().
Backwards compatible with beams compiled with lager 1.x
Link to this function

log(Level, Process, Message)

View Source

Specs

log(Level, Process | MetadataList, Message) -> ok
       when
           Level :: log_level(),
           Process :: pid() | atom(),
           MetadataList :: [{atom(), term()}],
           Message :: string().
Manually log a message into lager without using the parse transform.
Link to this function

log(Level, Process, Message, Args)

View Source

Specs

log(Level, Process | MetadataList, Message, Args) -> ok
       when
           Level :: log_level(),
           Process :: pid() | atom(),
           MetadataList :: [{atom(), term()}],
           Message :: string(),
           Args :: list().
Manually log a message into lager without using the parse transform.
Link to this function

log(Sink, Level, Pid, Message, Args)

View Source

Specs

log(Sink, Level, Process | MetadataList, Message, Args) -> ok | Error
       when
           Sink :: atom(),
           Level :: log_level(),
           Process :: pid() | atom(),
           MetadataList :: [{atom(), term()}],
           Message :: string(),
           Args :: list(),
           Error :: {error, Reason},
           Reason :: {bad_sink, Sink}.
Manually log a message into lager without using the parse transform.
Link to this function

log_unsafe(Level, MetadataList, Message, Args)

View Source

Specs

log_unsafe(Level, MetadataList, Message, Args) -> ok
              when
                  Level :: log_level(),
                  MetadataList :: [{atom(), term()}],
                  Message :: string(),
                  Args :: list().

Specs

md() -> [{atom(), any()}].
Get lager metadata for current process

Specs

md([{atom(), any()}, ...]) -> ok.
Set lager metadata for current process. Will badarg if you don't supply a list of {key, value} tuples keyed by atoms.

Specs

start() -> ok | {error, {atom(), term()}}.