Skip to content

Commit de6edae

Browse files
committed
admin::migrate: Use tracing macros instead of println!()
1 parent bcbc707 commit de6edae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/admin/migrate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn run(_opts: Opts) -> Result<(), Error> {
2323
// TODO: Check `any_pending_migrations()` with a read-only connection and error if true.
2424
// It looks like this requires changes upstream to make this pub in `migration_macros`.
2525

26-
println!("==> Skipping migrations and category sync (read-only mode)");
26+
warn!("Skipping migrations and category sync (read-only mode)");
2727

2828
// The service is undergoing maintenance or mitigating an outage.
2929
// Exit with success to ensure configuration changes can be made.
@@ -34,10 +34,10 @@ pub fn run(_opts: Opts) -> Result<(), Error> {
3434
// The primary is online, access directly via `DATABASE_URL`.
3535
let conn = crate::db::oneoff_connection_with_config(&config)?;
3636

37-
println!("==> migrating the database");
37+
info!("Migrating the database");
3838
embedded_migrations::run_with_output(&conn, &mut std::io::stdout())?;
3939

40-
println!("==> synchronizing crate categories");
40+
info!("Synchronizing crate categories");
4141
crate::boot::categories::sync_with_connection(CATEGORIES_TOML, &conn).unwrap();
4242

4343
Ok(())

0 commit comments

Comments
 (0)