anchor.diff:              %% Forward to collaboration message.
               Myself = pnode(),
               psend(Collaborator, {collaborate, From, Myself, Key, Value}),
  -            lager:info("~p: node ~p sent replication request for key ~p with value ~p", [?MODULE, node(), Key, Value]),
  +            partisan_logger:info("~p: node ~p sent replication request for key ~p with value ~p", [?MODULE, node(), Key, Value]),
   
               %% Wait for collaboration ack before proceeding for n-host resilience (n = 2).
               receive
                   {collaborate_ack, From, Key, Value} ->
  -                    lager:info("~p: node ~p ack received for key ~p value ~p", [?MODULE, node(), Key, Value]),
  +                    partisan_logger:info("~p: node ~p ack received for key ~p value ~p", [?MODULE, node(), Key, Value]),
   
                       %% Reply to caller.
                       psend(FromPid, {response, FromRequestId, ok}),
  
positive.code: handle_info({collaborate, {FromPid, FromRequestId}=From, SourceNode, Key, Value}, #state{membership=[_Primary, _Collaborator | Backups], store=Store0}=State) ->
      %% Write value locally.
      Store = write(Key, Value, Store0),
      lager:info("~p: node ~p storing updated value key ~p value ~p", [?MODULE, node(), Key, Value]),
  
      %% On ack, reply to caller.
      psend(FromPid, {response, FromRequestId, ok}),
  
      %% Send write acknowledgement.
      psend(SourceNode, {collaborate_ack, From, Key, Value}),
      lager:info("~p: node ~p acknowledging value for key ~p value ~p", [?MODULE, node(), Key, Value]),
  
      %% Send backup message to backups.
      lists:foreach(fun(Backup) -> psend(Backup, {backup, From, Key, Value}) end, Backups),
  
negative.code: 
  -record(state, {store, membership=[]}).
  
  -define(PB_TIMEOUT,       1000).
  -define(PB_RETRY_TIMEOUT, 100).
  
  