@@ -732,20 +732,39 @@ bool price::send( price *prices[], const unsigned n )
732
732
for ( unsigned i = 0 , j = 0 ; i < n; ++i ) {
733
733
price *const p = prices[ i ];
734
734
if ( PC_UNLIKELY ( ! p->init_ && ! p->init_publish () ) ) {
735
+ PC_LOG_ERR ( " failed to initialize publisher" )
736
+ .add ( " price_account" , *p->get_account () )
737
+ .add ( " product_account" , *p->prod_ ->get_account () )
738
+ .add ( " symbol" , p->get_symbol () )
739
+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
735
740
continue ;
736
741
}
737
742
if ( PC_UNLIKELY ( ! p->has_publisher () ) ) {
743
+ PC_LOG_ERR ( " missing publish permission" )
744
+ .add ( " price_account" , *p->get_account () )
745
+ .add ( " product_account" , *p->prod_ ->get_account () )
746
+ .add ( " symbol" , p->get_symbol () )
747
+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
738
748
continue ;
739
749
}
740
750
if ( PC_UNLIKELY ( ! p->get_is_ready_publish () ) ) {
751
+ PC_LOG_ERR ( " not ready to publish - check rpc / pyth_tx connection" )
752
+ .add ( " price_account" , *p->get_account () )
753
+ .add ( " product_account" , *p->prod_ ->get_account () )
754
+ .add ( " symbol" , p->get_symbol () )
755
+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
741
756
continue ;
742
757
}
743
758
manager *const mgr = p->get_manager ();
744
759
if ( ! mgr1 ) {
745
760
mgr1 = mgr;
746
761
}
747
762
else if ( mgr != mgr1 ) {
748
- PC_LOG_ERR ( " unexpected manager" ).end ();
763
+ PC_LOG_ERR ( " unexpected manager" )
764
+ .add ( " price_account" , *p->get_account () )
765
+ .add ( " product_account" , *p->prod_ ->get_account () )
766
+ .add ( " symbol" , p->get_symbol () )
767
+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
749
768
continue ;
750
769
}
751
770
const uint64_t slot = mgr->get_slot ();
@@ -763,7 +782,11 @@ bool price::send( price *prices[], const unsigned n )
763
782
mgr->submit ( msg );
764
783
}
765
784
else {
766
- PC_LOG_ERR ( " failed to build msg" );
785
+ PC_LOG_ERR ( " failed to build msg" )
786
+ .add ( " price_account" , *p->get_account () )
787
+ .add ( " product_account" , *p->prod_ ->get_account () )
788
+ .add ( " symbol" , p->get_symbol () )
789
+ .add ( " price_type" , price_type_to_str ( p->get_price_type () ) ).end ();
767
790
}
768
791
}
769
792
else {
@@ -774,7 +797,7 @@ bool price::send( price *prices[], const unsigned n )
774
797
std::string ( 100 , ' \0 ' ), p1->preq_ ->get_sent_time ()
775
798
);
776
799
p1->preq_ ->get_signature ()->enc_base58 ( p1->tvec_ .back ().first );
777
- PC_LOG_DBG ( " sent price update transaction " )
800
+ PC_LOG_DBG ( " sent price update" )
778
801
.add ( " price_account" , *p1->get_account () )
779
802
.add ( " product_account" , *p1->prod_ ->get_account () )
780
803
.add ( " symbol" , p1->get_symbol () )
0 commit comments