@@ -708,20 +708,39 @@ bool price::send( price *prices[], const unsigned n )
708708 for ( unsigned i = 0 , j = 0 ; i < n; ++i ) {
709709 price *const p = prices[ i ];
710710 if ( PC_UNLIKELY ( ! p->init_ && ! p->init_publish () ) ) {
711+ PC_LOG_ERR ( " failed to initialize publisher" )
712+ .add ( " price_account" , *p->get_account () )
713+ .add ( " product_account" , *p->prod_ ->get_account () )
714+ .add ( " symbol" , p->get_symbol () )
715+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
711716 continue ;
712717 }
713718 if ( PC_UNLIKELY ( ! p->has_publisher () ) ) {
719+ PC_LOG_ERR ( " missing publish permission" )
720+ .add ( " price_account" , *p->get_account () )
721+ .add ( " product_account" , *p->prod_ ->get_account () )
722+ .add ( " symbol" , p->get_symbol () )
723+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
714724 continue ;
715725 }
716726 if ( PC_UNLIKELY ( ! p->get_is_ready_publish () ) ) {
727+ PC_LOG_ERR ( " not ready to publish - check rpc / pyth_tx connection" )
728+ .add ( " price_account" , *p->get_account () )
729+ .add ( " product_account" , *p->prod_ ->get_account () )
730+ .add ( " symbol" , p->get_symbol () )
731+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
717732 continue ;
718733 }
719734 manager *const mgr = p->get_manager ();
720735 if ( ! mgr1 ) {
721736 mgr1 = mgr;
722737 }
723738 else if ( mgr != mgr1 ) {
724- PC_LOG_ERR ( " unexpected manager" ).end ();
739+ PC_LOG_ERR ( " unexpected manager" )
740+ .add ( " price_account" , *p->get_account () )
741+ .add ( " product_account" , *p->prod_ ->get_account () )
742+ .add ( " symbol" , p->get_symbol () )
743+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
725744 continue ;
726745 }
727746 const uint64_t slot = mgr->get_slot ();
@@ -739,7 +758,11 @@ bool price::send( price *prices[], const unsigned n )
739758 mgr->submit ( msg );
740759 }
741760 else {
742- PC_LOG_ERR ( " failed to build msg" );
761+ PC_LOG_ERR ( " failed to build msg" )
762+ .add ( " price_account" , *p->get_account () )
763+ .add ( " product_account" , *p->prod_ ->get_account () )
764+ .add ( " symbol" , p->get_symbol () )
765+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
743766 }
744767 }
745768 else {
0 commit comments