-
Notifications
You must be signed in to change notification settings - Fork 34
refactor: Migrate from log to tracing #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -23,12 +23,12 @@ | |||||
//! * `valid_until_block_height` - The block height until which the transaction remains valid.use | ||||||
//! std::str::FromStr; | ||||||
use futures::try_join; | ||||||
use log::info; | ||||||
use solana_sdk::{ | ||||||
commitment_config::CommitmentConfig, hash::Hash, pubkey::Pubkey, signature::Signature, | ||||||
transaction::Transaction, | ||||||
}; | ||||||
use std::str::FromStr; | ||||||
use tracing::info; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix compile error: import tracing::error for error! macro used below.
Apply this diff: -use tracing::info;
+use tracing::{info, error}; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
use super::{utils::FeeQuote, *}; | ||||||
use crate::{ | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -21,8 +21,8 @@ use std::str::FromStr; | |||||
|
||||||
use chrono::Utc; | ||||||
use futures::try_join; | ||||||
use log::info; | ||||||
use solana_sdk::{pubkey::Pubkey, transaction::Transaction}; | ||||||
use tracing::info; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix: missing tracing import for error! macro (build breaks). This file uses -use tracing::info;
+use tracing::{info, error}; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
use crate::{ | ||||||
models::{ | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,8 +19,8 @@ | |||||
use std::str::FromStr; | ||||||
|
||||||
use futures::try_join; | ||||||
use log::info; | ||||||
use solana_sdk::{pubkey::Pubkey, transaction::Transaction}; | ||||||
use tracing::info; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Build break: This file uses Apply this diff: -use tracing::info;
+use tracing::{error, info}; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
use crate::{ | ||||||
models::{ | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,8 +26,8 @@ | |||||
use std::str::FromStr; | ||||||
|
||||||
use log::info; | ||||||
use solana_sdk::{hash::Hash, pubkey::Pubkey, transaction::Transaction}; | ||||||
use tracing::info; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix missing This file calls -use tracing::info;
+use tracing::{info, error}; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
use crate::{ | ||||||
domain::relayer::solana::rpc::methods::utils::FeeQuote, | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,7 +26,6 @@ | |||||
use super::*; | ||||||
use std::str::FromStr; | ||||||
|
||||||
use log::debug; | ||||||
use solana_sdk::{ | ||||||
commitment_config::CommitmentConfig, | ||||||
hash::Hash, | ||||||
|
@@ -39,6 +38,7 @@ use solana_sdk::{ | |||||
transaction::Transaction, | ||||||
}; | ||||||
use solana_system_interface::program; | ||||||
use tracing::debug; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix compile error: import tracing::error for error! usages. This file calls Apply this diff: -use tracing::debug;
+use tracing::{debug, error}; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
use spl_token::{amount_to_ui_amount, state::Account}; | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Quick repo-wide sanity check for logging migration (script included).
Verify no stray log macros/println! remain and that all unqualified tracing macros are imported.
🏁 Script executed:
Length of output: 1893
Action required: complete logging migration — remove println! and add missing tracing imports
Found stray println! calls and unqualified tracing macros missing imports.
println! occurrences (replace with appropriate tracing macros):
src/utils/secp256k.rs:50
src/services/plugins/socket.rs:150
src/models/signer/mod.rs:883
src/domain/transaction/solana/status.rs:128
src/domain/transaction/evm/price_calculator.rs:1007
src/domain/relayer/stellar/stellar_relayer.rs:337, 364
src/domain/relayer/solana/rpc/methods/get_features_enabled.rs:76
src/domain/relayer/solana/rpc/methods/prepare_transaction.rs:683
src/domain/relayer/solana/rpc/methods/utils.rs:2596–2597
Missing import for tracing::error (unqualified error! used in):
src/domain/relayer/solana/rpc/methods/prepare_transaction.rs
src/domain/relayer/solana/rpc/methods/sign_and_send_transaction.rs
src/domain/relayer/solana/rpc/methods/sign_transaction.rs
src/domain/relayer/solana/rpc/methods/transfer_transaction.rs
src/domain/relayer/solana/rpc/methods/utils.rs
Fix: replace println! with the appropriate tracing macro (info/warn/debug/etc.) and either add the missing imports (e.g., add use tracing::error; or use a grouped import) or fully-qualify calls (tracing::error!).
🤖 Prompt for AI Agents