refactor(config): use the logger

This commit is contained in:
Amaan Qureshi 2025-09-20 01:10:37 -04:00 committed by Amaan Qureshi
parent d13657c40c
commit e5c11d9efc
2 changed files with 4 additions and 2 deletions

View file

@ -22,5 +22,6 @@ workspace = true
[dependencies]
anyhow.workspace = true
etcetera.workspace = true
log.workspace = true
serde.workspace = true
serde_json.workspace = true

View file

@ -4,6 +4,7 @@ use std::{env, fs, path::PathBuf};
use anyhow::{Context, Result};
use etcetera::BaseStrategy as _;
use log::warn;
use serde::{Deserialize, Serialize};
use serde_json::Value;
@ -47,8 +48,8 @@ impl Config {
if legacy_apple_path.is_file() {
fs::create_dir_all(xdg_path.parent().unwrap())?;
fs::rename(&legacy_apple_path, &xdg_path)?;
println!(
"Warning: your config.json file has been automatically migrated from \"{}\" to \"{}\"",
warn!(
"Your config.json file has been automatically migrated from \"{}\" to \"{}\"",
legacy_apple_path.display(),
xdg_path.display()
);