Module e2_log

e2 log support.

Copyright © 2011-2016 Garrett Smith

Authors: Garrett Smith ([email protected]).

Description

e2 log support.

e2_log provides a more terse interface to Erlang's standard error_logger module.

Function Index

add_handler/1Registered a log handler.
add_handler/2Registered a log handler.
delete_handler/1Unregisters a log handler.
error/1Logs an error report.
error/2Log an error message or report.
info/1Log an info report.
info/2Log an info report.
tty/1Turns tty printing on or off.
warn/1Log a warning report.
warn/2Log a warning report.

Function Details

add_handler/1

add_handler(Handler) -> any()

Equivalent to add_handler(Handler, []).

Registered a log handler.

add_handler/2

add_handler(Handler, Args) -> ok

Registered a log handler.

Log handlers must implement the e2_log_handler behavior.

delete_handler/1

delete_handler(Handler) -> ok

Unregisters a log handler.

error/1

error(Report::Info) -> ok

Logs an error report.

error/2

error(Type::MsgOrType, Report::ArgsOrReport) -> ok

Log an error message or report.

Refer to info/2 for an explanation on how the arguments are used in this function.

info/1

info(Report::Info) -> ok

Log an info report.

info/2

info(Type::MsgOrType, Report::ArgsOrReport) -> ok

Log an info report.

If the first argument is a string, the second argument must be a list of arguments used in message format string.

If the first argument is an atom, it is used as the report type for the second argument.

tty/1

tty(Flag::boolean()) -> ok

Turns tty printing on or off.

warn/1

warn(Report::Warning) -> ok

Log a warning report.

warn/2

warn(Type::MsgOrType, Report::ArgsOrReport) -> ok

Log a warning report.

If the first argument is a string, the second argument must be a list of arguments used in message format string.

If the first argument is an atom, it is used as the report type for the second argument.


Generated by EDoc