|
|
|
@ -19,38 +19,40 @@
|
|
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
|
-define(PRINT(Format, Args), io:format(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-ifdef(LAGER).
|
|
|
|
|
-compile([{parse_transform, lager_transform}]).
|
|
|
|
|
-ifdef(P1LOGGER).
|
|
|
|
|
|
|
|
|
|
-define(DEBUG(Format, Args),
|
|
|
|
|
lager:debug(Format, Args)).
|
|
|
|
|
p1_logger:debug_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(INFO_MSG(Format, Args),
|
|
|
|
|
lager:info(Format, Args)).
|
|
|
|
|
p1_logger:info_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(WARNING_MSG(Format, Args),
|
|
|
|
|
lager:warning(Format, Args)).
|
|
|
|
|
p1_logger:warning_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(ERROR_MSG(Format, Args),
|
|
|
|
|
lager:error(Format, Args)).
|
|
|
|
|
p1_logger:error_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(CRITICAL_MSG(Format, Args),
|
|
|
|
|
lager:critical(Format, Args)).
|
|
|
|
|
p1_logger:critical_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
|
|
|
|
|
-else.
|
|
|
|
|
|
|
|
|
|
-compile([{parse_transform, lager_transform}]).
|
|
|
|
|
|
|
|
|
|
-define(DEBUG(Format, Args),
|
|
|
|
|
p1_logger:debug_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
lager:debug(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(INFO_MSG(Format, Args),
|
|
|
|
|
p1_logger:info_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
lager:info(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(WARNING_MSG(Format, Args),
|
|
|
|
|
p1_logger:warning_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
lager:warning(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(ERROR_MSG(Format, Args),
|
|
|
|
|
p1_logger:error_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
lager:error(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-define(CRITICAL_MSG(Format, Args),
|
|
|
|
|
p1_logger:critical_msg(?MODULE, ?LINE, Format, Args)).
|
|
|
|
|
lager:critical(Format, Args)).
|
|
|
|
|
|
|
|
|
|
-endif.
|
|
|
|
|