anchor.diff:      end.
   
   
  -access_sql(Access) ->
  +sql(Access) ->
       case maps:get(args, Access, "") of
           #{<<"qstr">> := QStr} ->
               re:replace(
  
positive.code: -module(dderl_access_logger).
  -include("dderl.hrl").
  
  -export([install/1, uninstall/1, log/2]).
  
  -define(AccessSchema,
          [{src,       fun access_src/1},
           {proxy,     fun access_proxy/1},
           {userId,    fun access_userid/1},
           {userName,  fun access_username/1},
           {sessId,    fun access_sessionid/1},
           {version,   fun access_version/1},
           loglevel,
           cmd,
           {args,      fun access_args/1},
           {bytes,     fun access_bytes/1},
           {time,      fun access_time/1},
           connUser,
           connTarget,
           connDbType,
           connStr,
           {sql,       fun access_sql/1}]).
  
  
  install(App) ->
      ok = gen_event:add_handler(
             lager_event, {dderl_access_lager_file_backend, App},
             [{file, "log/dderl_access.log"}, {level, debug}, {size, 10485760},
              {date, "$D0"}, {count, 5}, {application, App}, {props, ?AccessSchema}]),
      ok = lager:set_loglevel({dderl_access_lager_file_backend, App}, debug),
      ?Info("activity logger started").
  
  
negative.code:           CmdArgs -> list_to_binary(io_lib:format("~p", [CmdArgs]))
        end).
  
  bytes(Access) ->
      case maps:get(bytes, Access, "") of
          "" -> "";
          Bytes when is_integer(Bytes) -> integer_to_list(Bytes);
          Bytes -> io_lib:format("~p", [Bytes])
      end.
  
  time(Access) ->
      case maps:get(time, Access, "") of
          "" -> "";
          Time when is_integer(Time) -> integer_to_list(Time);
  