Make hz friendlier to non-zx projects
This commit is contained in:
parent
c9cdedf85c
commit
e9b1bccf57
@ -28,9 +28,6 @@
|
|||||||
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
|
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
|
||||||
code_change/3, terminate/2]).
|
code_change/3, terminate/2]).
|
||||||
|
|
||||||
%% TODO: Make logging more flexible
|
|
||||||
-include("$zx_include/zx_logger.hrl").
|
|
||||||
|
|
||||||
|
|
||||||
%%% Type and Record Definitions
|
%%% Type and Record Definitions
|
||||||
|
|
||||||
@ -268,3 +265,9 @@ do_request(Request,
|
|||||||
do_request(Request, From, State = #s{chain_nodes = {[], Used}}) ->
|
do_request(Request, From, State = #s{chain_nodes = {[], Used}}) ->
|
||||||
Fresh = lists:reverse(Used),
|
Fresh = lists:reverse(Used),
|
||||||
do_request(Request, From, State#s{chain_nodes = {Fresh, []}}).
|
do_request(Request, From, State#s{chain_nodes = {Fresh, []}}).
|
||||||
|
|
||||||
|
|
||||||
|
log(Level, Format, Args) ->
|
||||||
|
Raw = io_lib:format("~w ~w: " ++ Format, [?MODULE, self() | Args]),
|
||||||
|
Entry = unicode:characters_to_list(Raw),
|
||||||
|
logger:log(Level, Entry).
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user