mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-24 10:55:56 +00:00
Change println! to debug! (#5346)
This commit is contained in:
parent
ed55a25e62
commit
8ee81a3967
1 changed files with 6 additions and 5 deletions
|
@ -20,6 +20,7 @@ use diesel::{
|
||||||
use diesel_migrations::MigrationHarness;
|
use diesel_migrations::MigrationHarness;
|
||||||
use lemmy_utils::{error::LemmyResult, settings::SETTINGS};
|
use lemmy_utils::{error::LemmyResult, settings::SETTINGS};
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
use tracing::log::debug;
|
||||||
|
|
||||||
diesel::table! {
|
diesel::table! {
|
||||||
pg_namespace (nspname) {
|
pg_namespace (nspname) {
|
||||||
|
@ -66,7 +67,7 @@ impl MigrationHarnessWrapper<'_> {
|
||||||
.map(|d| d.to_string())
|
.map(|d| d.to_string())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let name = migration.name();
|
let name = migration.name();
|
||||||
println!("{duration} run {name}");
|
debug!("{duration} run {name}");
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
@ -111,7 +112,7 @@ impl MigrationHarness<Pg> for MigrationHarnessWrapper<'_> {
|
||||||
.map(|d| d.to_string())
|
.map(|d| d.to_string())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let name = migration.name();
|
let name = migration.name();
|
||||||
println!("{duration} revert {name}");
|
debug!("{duration} revert {name}");
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
@ -191,9 +192,9 @@ pub fn run(options: Options) -> LemmyResult<Branch> {
|
||||||
|
|
||||||
// Block concurrent attempts to run migrations until `conn` is closed, and disable the
|
// Block concurrent attempts to run migrations until `conn` is closed, and disable the
|
||||||
// trigger that prevents the Diesel CLI from running migrations
|
// trigger that prevents the Diesel CLI from running migrations
|
||||||
println!("Waiting for lock...");
|
debug!("Waiting for lock...");
|
||||||
conn.batch_execute("SELECT pg_advisory_lock(0);")?;
|
conn.batch_execute("SELECT pg_advisory_lock(0);")?;
|
||||||
println!("Running Database migrations (This may take a long time)...");
|
debug!("Running Database migrations (This may take a long time)...");
|
||||||
|
|
||||||
// Drop `r` schema, so migrations don't need to be made to work both with and without things in
|
// Drop `r` schema, so migrations don't need to be made to work both with and without things in
|
||||||
// it existing
|
// it existing
|
||||||
|
@ -226,7 +227,7 @@ pub fn run(options: Options) -> LemmyResult<Branch> {
|
||||||
Branch::ReplaceableSchemaNotRebuilt
|
Branch::ReplaceableSchemaNotRebuilt
|
||||||
};
|
};
|
||||||
|
|
||||||
println!("Database migrations complete.");
|
debug!("Database migrations complete.");
|
||||||
|
|
||||||
Ok(output)
|
Ok(output)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue