Skip to content

Commit

Permalink
fix: log level order, cosmos logging nit (#3374)
Browse files Browse the repository at this point in the history
### Description

Our logging prio order was off, double checked with [this
crate](https://docs.rs/log/latest/log/enum.Level.html). Debug logs would
be visible at `Info` level according to the previous rules.

### Drive-by changes

Removed the debug formatting of a cosmsos log field, so it's no longer
surrounded in quotes (bc we'd get `cursor_label:
""InterchainGasPaymentCursor""`)

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
  • Loading branch information
daniel-savu authored Mar 7, 2024
1 parent 2c2f79c commit 9736164
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/chains/hyperlane-cosmos/src/providers/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl WasmIndexer for CosmosWasmIndexer {
T: Send + Sync + PartialEq + Debug + 'static,
{
let client = self.provider.rpc().clone();
debug!(?block_number, ?cursor_label, "Getting logs in block");
debug!(?block_number, cursor_label, domain=?self.provider.domain, "Getting logs in block");

let (block, block_results) = tokio::join!(
call_with_retry(|| { Box::pin(Self::get_block(client.clone(), block_number)) }),
Expand Down
4 changes: 2 additions & 2 deletions rust/hyperlane-base/src/settings/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ pub enum Level {
/// Warn
Warn = 2,
/// Debug
Debug = 3,
Debug = 4,
/// Trace
Trace = 5,
/// Trace + Additional logs from dependencies
DependencyTrace = 6,
/// Info
#[serde(other)]
#[default]
Info = 4,
Info = 3,
}

impl From<Level> for LevelFilter {
Expand Down

0 comments on commit 9736164

Please sign in to comment.