move receipts to their own log facility

This commit is contained in:
Christien Rioux 2024-06-30 14:35:10 -04:00
parent 4d4e447132
commit 94a8c2a54e
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
pub static DEFAULT_LOG_FACILITIES_IGNORE_LIST: [&str; 27] = [ pub static DEFAULT_LOG_FACILITIES_IGNORE_LIST: [&str; 28] = [
"mio", "mio",
"h2", "h2",
"hyper", "hyper",
@ -26,6 +26,7 @@ pub static DEFAULT_LOG_FACILITIES_IGNORE_LIST: [&str; 27] = [
"network_result", "network_result",
"dht", "dht",
"fanout", "fanout",
"receipt",
]; ];
pub static DEFAULT_LOG_FACILITIES_ENABLED_LIST: [&str; 8] = [ pub static DEFAULT_LOG_FACILITIES_ENABLED_LIST: [&str; 8] = [

View File

@ -326,7 +326,7 @@ impl ReceiptManager {
callback: impl ReceiptCallback, callback: impl ReceiptCallback,
) { ) {
let receipt_nonce = receipt.get_nonce(); let receipt_nonce = receipt.get_nonce();
log_rpc!(debug "== New Multiple Receipt ({}) {} ", expected_returns, receipt_nonce.encode()); event!(target: "receipt", Level::DEBUG, "== New Multiple Receipt ({}) {} ", expected_returns, receipt_nonce.encode());
let record = Arc::new(Mutex::new(ReceiptRecord::new( let record = Arc::new(Mutex::new(ReceiptRecord::new(
receipt, receipt,
expiration, expiration,
@ -346,7 +346,7 @@ impl ReceiptManager {
eventual: ReceiptSingleShotType, eventual: ReceiptSingleShotType,
) { ) {
let receipt_nonce = receipt.get_nonce(); let receipt_nonce = receipt.get_nonce();
log_rpc!(debug "== New SingleShot Receipt {}", receipt_nonce.encode()); event!(target: "receipt", Level::DEBUG, "== New SingleShot Receipt {}", receipt_nonce.encode());
let record = Arc::new(Mutex::new(ReceiptRecord::new_single_shot( let record = Arc::new(Mutex::new(ReceiptRecord::new_single_shot(
receipt, expiration, eventual, receipt, expiration, eventual,
@ -375,7 +375,7 @@ impl ReceiptManager {
#[allow(dead_code)] #[allow(dead_code)]
pub async fn cancel_receipt(&self, nonce: &Nonce) -> EyreResult<()> { pub async fn cancel_receipt(&self, nonce: &Nonce) -> EyreResult<()> {
log_rpc!(debug "== Cancel Receipt {}", nonce.encode()); event!(target: "receipt", Level::DEBUG, "== Cancel Receipt {}", nonce.encode());
// Remove the record // Remove the record
let record = { let record = {
@ -412,7 +412,7 @@ impl ReceiptManager {
let receipt_nonce = receipt.get_nonce(); let receipt_nonce = receipt.get_nonce();
let extra_data = receipt.get_extra_data(); let extra_data = receipt.get_extra_data();
log_rpc!(debug "<<== RECEIPT {} <- {}{}", event!(target: "receipt", Level::DEBUG, "<<== RECEIPT {} <- {}{}",
receipt_nonce.encode(), receipt_nonce.encode(),
match receipt_returned { match receipt_returned {
ReceiptReturned::OutOfBand => "OutOfBand".to_owned(), ReceiptReturned::OutOfBand => "OutOfBand".to_owned(),