@@ -263,11 +263,7 @@ impl StateMachine {
263263 /// command safely in case of network failure etc.
264264 #[ tracing:: instrument( level = "debug" , skip( self , entry) , fields( log_id=%entry. log_id) ) ]
265265 pub async fn apply ( & self , entry : & Entry < LogEntry > ) -> Result < AppliedState , MetaStorageError > {
266- info ! (
267- "apply: summary: {}; payload: {:?}" ,
268- entry. summary( ) ,
269- entry. payload
270- ) ;
266+ info ! ( "apply: summary: {}" , entry. summary( ) , ) ;
271267
272268 let log_id = & entry. log_id ;
273269
@@ -280,8 +276,11 @@ impl StateMachine {
280276 txn_sm_meta. insert ( & LastApplied , & StateMachineMetaValue :: LogId ( * log_id) ) ?;
281277
282278 match entry. payload {
283- EntryPayload :: Blank => { }
279+ EntryPayload :: Blank => {
280+ info ! ( "apply: blank" ) ;
281+ }
284282 EntryPayload :: Normal ( ref data) => {
283+ info ! ( "apply: {}" , data) ;
285284 if let Some ( ref txid) = data. txid {
286285 let ( serial, resp) =
287286 self . txn_get_client_last_resp ( & txid. client , & txn_tree) ?;
@@ -303,7 +302,12 @@ impl StateMachine {
303302 } ;
304303
305304 let res = self . apply_cmd ( & data. cmd , & txn_tree, kv_pairs. as_ref ( ) , log_time_ms) ;
306- info ! ( "apply_result: summary: {}; res: {:?}" , entry. summary( ) , res) ;
305+ if let Ok ( ok) = & res {
306+ info ! ( "apply_result: summary: {}; res ok: {}" , entry. summary( ) , ok) ;
307+ }
308+ if let Err ( err) = & res {
309+ info ! ( "apply_result: summary: {}; res err: {:?}" , entry. summary( ) , err) ;
310+ }
307311
308312 let applied_state = res?;
309313
@@ -317,6 +321,7 @@ impl StateMachine {
317321 return Ok ( Some ( applied_state) ) ;
318322 }
319323 EntryPayload :: Membership ( ref mem) => {
324+ info ! ( "apply: membership: {:?}" , mem) ;
320325 txn_sm_meta. insert (
321326 & LastMembership ,
322327 & StateMachineMetaValue :: Membership ( EffectiveMembership {
@@ -760,7 +765,7 @@ impl StateMachine {
760765 kv_pairs : Option < & ( DeleteByPrefixKeyMap , DeleteByPrefixKeyMap ) > ,
761766 log_time_ms : u64 ,
762767 ) -> Result < AppliedState , MetaStorageError > {
763- info ! ( "apply_cmd: {:? }" , cmd) ;
768+ info ! ( "apply_cmd: {}" , cmd) ;
764769
765770 match cmd {
766771 Cmd :: IncrSeq { ref key } => self . apply_incr_seq_cmd ( key, txn_tree) ,
0 commit comments