anchor.diff:      Connection = ?DecryptPid(binary_to_list(proplists:get_value(<<"connection">>, BodyJson, <<>>))),
       case lists:member(Connection, Connections) of
           true ->
  -            Connection:close(),
  +            Connection:close(port_close),
               RestConnections = lists:delete(Connection, Connections),
               From ! {reply, jsx:encode([{<<"disconnect">>, <<"ok">>}])},
               Priv#priv{connections = RestConnections};
  
positive.code:         , local}
      ]).
  
  -define(LogOci(__L,__T,__File,__Func,__Line,__Msg),
      begin
          lager:__L(__File, "[~s] {~s:~s:~p} ~s", [__T,__File,__Func,__Line,__Msg]),
          dderl_dal:log_to_db(__L
                              , list_to_atom(__File)
                              , list_to_atom(__Func)
  
negative.code:     Tnsstr   = proplists:get_value(<<"tnsstr">>, BodyJson, <<>>),
      ?Info("session:open ~p", [{IpAddr, Port, Service, Type, User, Password, Tnsstr}]),    
      LogFun = fun
                   ({Lvl, File, Func, Line, Msg}) ->
                       case Lvl of
                          debug       -> ?LogOci(debug,File,Func,Line,Msg);
                          info        -> ?LogOci(info,File,Func,Line,Msg);
                          notice      -> ?LogOci(info,File,Func,Line,Msg);
                          error       -> ?LogOci(error,File,Func,Line,Msg);
                          warn        -> ?LogOci(error,File,Func,Line,Msg);
                          critical    -> ?LogOci(error,File,Func,Line,Msg);
                          fatal       -> ?LogOci(error,File,Func,Line,Msg);
                          unknown     -> ?LogOci(error,File,Func,Line,Msg)
                       end;                     
                   (Log) ->
                      io:format(user, "Log in unsupported format ~p~n", [Log])
  