anchor.diff:  		Reason :: term().
   %% @doc Write a RADIUS event to authorization log.
   auth_log(Protocol, Server, Client, Type, RequestAttributes, ResponseAttributes) ->
  -	TS = erlang:system_time(?MILLISECOND),
  -	N = erlang:unique_integer([positive]),
  -	Event = {TS, N, Protocol, node(), Server, Client, Type,
  -			RequestAttributes, ResponseAttributes},
  -	disk_log:log(?AUTHLOG, Event).
  +	Event = [Protocol, node(), Server, Client, Type,
  +			RequestAttributes, ResponseAttributes],
  +	write_log(?AUTHLOG, Event).
   
   -spec auth_log(Protocol, Server, Client, Request, Response) -> Result
   	when
  
positive.code: %% @doc Open authorization event disk log.
  auth_open() ->
  	{ok, Directory} = application:get_env(ocs, auth_log_dir),
  	case file:make_dir(Directory) of
  		ok ->
  			auth_open1(Directory);
  		{error, eexist} ->
  			auth_open1(Directory);
  		{error, Reason} ->
  			{error, Reason}
  	end.
  %% @hidden
  auth_open1(Directory) ->
  	{ok, LogSize} = application:get_env(ocs, auth_log_size),
  	{ok, LogFiles} = application:get_env(ocs, auth_log_files),
  	Log = ?AUTHLOG,
  	FileName = Directory ++ "/" ++ atom_to_list(Log),
  	case disk_log:open([{name, Log}, {file, FileName},
  					{type, wrap}, {size, {LogSize, LogFiles}}]) of
  		{ok, Log} ->
  			ok;
  		{repaired, Log, _Recovered, _Bad} ->
  			ok;
  		{error, Reason} ->
  			Descr = lists:flatten(disk_log:format_error(Reason)),
  			Trunc = lists:sublist(Descr, length(Descr) - 1),
  			error_logger:error_report([Trunc, {module, ?MODULE},
  					{log, Log}, {error, Reason}]),
  			{error, Reason}
  	end.
  
  -type auth_event() :: {
  		TS :: pos_integer(), % posix time in milliseconds
  
negative.code: 		Reason :: term().
  %% @doc Close auth disk log.
  auth_close() ->
  	close_log(?AUTHLOG).
  
  -record(event,
  		{host :: string(),
  