Skip to content

Commit

Permalink
only enable with Info logging
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Jul 18, 2024
1 parent 7560c2a commit 95e96e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xmtp_mls/src/storage/encrypted_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use diesel::{
sql_query,
};
use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness};
use log::warn;
use log::{log_enabled, warn};
use rand::RngCore;
use xmtp_cryptography::utils as crypto_utils;

Expand Down Expand Up @@ -161,7 +161,9 @@ impl EncryptedMessageStore {
cipher_version[0].cipher_version,
cipher_provider_version[0].cipher_provider_version,
);
conn.batch_execute("PRAGMA cipher_log = stderr; PRAGMA cipher_log_level = INFO;")?;
if log_enabled!(log::Level::Info) {
conn.batch_execute("PRAGMA cipher_log = stderr; PRAGMA cipher_log_level = INFO;")?;
}
}

log::info!("Migrations successful");
Expand Down

0 comments on commit 95e96e2

Please sign in to comment.