Module logi_transform

A parse_transform module for logi.

Copyright © 2014-2016 Takeru Ohta <phjgt308@gmail.com>

See also: logi:log/4, logi_location:guess_location/0.

Description

A parse_transform module for logi

This module is used to provide following information automatically to log messages (e.g. the messages produced by logi:info/2): - Application Name - Module Name - Function Name - Line Number

The above functionality will be enabled if the option {parse_transform, logi_transform} is passed to the compiler.

Reference documentations for parse_transform: - http://www.erlang.org/doc/man/erl_id_trans.html - http://www.erlang.org/doc/apps/erts/absform.html

Data Types

clause()

clause() = {clause, line(), [term()], [term()], [expr()]} | erl_parse:abstract_clause()

expr()

expr() = expr_call_remote() | expr_var() | erl_parse:abstract_expr() | term()

expr_call_remote()

expr_call_remote() = {call, line(), {remote, line(), expr(), expr()}, [expr()]}

expr_var()

expr_var() = {var, line(), atom()}

form()

form() = {attribute, line(), atom(), term()} | {function, line(), atom(), non_neg_integer(), [clause()]} | erl_parse:abstract_form()

line()

line() = non_neg_integer()

Function Index

parse_transform/2Performs transformations for logi.

Function Details

parse_transform/2

parse_transform(AbstractForms::[form()], Options::[compile:option()]) -> [form()]

Performs transformations for logi


Generated by EDoc