summaryrefslogtreecommitdiff
path: root/priv/templates/simplelogging.hrl
blob: d46dae37d47652a6d76432382bcad61eceddd59d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%%% Author : Geoff Cant <nem@erlang.geek.nz>
%%% Description : Logging macros
%%% Created : 13 Jan 2006 by Geoff Cant <nem@erlang.geek.nz>

-ifndef(logging_macros).
-define(logging_macros, true).


-define(INFO(Format, Args),
        error_logger:info_msg("pid=~p mod=~p line=~p " ++ Format,
                              [self(), ?MODULE, ?LINE | Args])).
-define(WARN(Format, Args),
        error_logger:warning_msg("pid=~p mod=~p line=~p " ++ Format,
                                 [self(), ?MODULE, ?LINE | Args])).
-define(ERR(Format, Args),
        error_logger:error_msg("pid=~p mod=~p line=~p " ++ Format,
                               [self(), ?MODULE, ?LINE | Args])).

-endif. %logging