how to pass a error_loger to erlang-mysql?

wenew zhang <>
Thu Jul 2 06:01:47 CEST 2009

erlang-mysql driver have a LogFun Arg,i want pass error_loger:info_msg to
i try:
i can't work out!

some code below,i'm confused with log/4 and the macros defined

start_link(PoolId, Host, Port, User, Password, Database, LogFun) ->
init([PoolId, Host, Port, User, Password, Database, LogFun, Encoding]) ->
    LogFun1 = if LogFun == undefined -> fun log/4; true -> LogFun end,
    LogFun(?MODULE, ?LINE,Level,fun()-> {Msg,[]} end)).
    LogFun(?MODULE, ?LINE,Level,fun()-> {Msg,Params} end)).
-define(L(Msg), io:format("~p:~b ~p ~n", [?MODULE, ?LINE, Msg])).

More information about the erlang-questions mailing list