anchor.diff:  		End :: calendar:datetime(),
   		Events :: [ocs_log:acct_event()].
   %% @doc Query diameter logs.
  -ql(acct = _Type, {MatchHead, MatchConditions} = Match,
  +ql(acct = _Log, {MatchHead, MatchConditions} = Match,
   		{{_, _, _}, {_, _, _}} = Start,
   		{{_, _, _}, {_, _, _}} = End)
   		when is_list(MatchConditions),
  
positive.code: %%
  %% 	Start will be minus one hour from now.
  %%
  ql(acct = _Type, {MatchHead, MatchConditions} = Match)
  		when is_list(MatchConditions),
  		(is_record(MatchHead, '3gpp_ro_CCR')
  		or is_record(MatchHead, '3gpp_ro_CCA')
  
negative.code: 			'Firmware-Revision'],
  	diameter_service_info(diameter:services(), Info).
  
  -spec ll(Log) -> Events
  	when
  		Log :: acct | auth,
  		Events :: [ocs_log:acct_event()] | [ocs_log:auth_event()].
  %% @doc Get the last five events written to log.
  ll(acct = _Log) ->
  	case ocs_log:last(ocs_acct, 5) of
  		{Count, Events} when is_integer(Count) ->
  			Events;
  		{error, Reason} ->
  			exit(Reason)
  	end;
  ll(auth = _Log) ->
  	case ocs_log:last(ocs_auth, 5) of
  		{Count, Events} when is_integer(Count) ->
  			Events;
  		{error, Reason} ->
  			exit(Reason)
  	end.
  
  -spec ll(Log, N) -> Events
  	when
  		Log :: acct | auth,
  		N :: pos_integer(),
  		Events :: [ocs_log:acct_event()] | [ocs_log:auth_event()].
  %% @doc Get the last `N' events written to log.
  ll(acct = _Log, N) when is_integer(N), N > 0 ->
  	set_max_heap(),
  	case ocs_log:last(ocs_acct, N) of
  		{Count, Events} when is_integer(Count) ->
  			Events;
  		{error, Reason} ->
  			exit(Reason)
  	end;
  ll(auth = _Log, N) when is_integer(N), N > 0 ->
  	set_max_heap(),
  	case ocs_log:last(ocs_auth, N) of
  		{Count, Events} when is_integer(Count) ->
  			Events;
  		{error, Reason} ->
  			exit(Reason)
  	end.
  
  -spec ql(Log, Match) -> Events
  	when
  		Log :: acct | auth,
  		Match :: DiameterMatchSpec | RatedMatchSpec,
  		DiameterMatchSpec :: {DiameterMatchHead, MatchConditions},
  		DiameterMatchHead :: #'3gpp_ro_CCR'{} | #'3gpp_ro_CCA'{},
  