feat: use a logging library
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

gives us logs from actix and sqlx that otherwise arent exposed to us
This commit is contained in:
Radical 2025-05-02 01:18:13 +02:00
parent 80111af3de
commit 481c2c3648
11 changed files with 41 additions and 27 deletions

View file

@ -1,4 +1,5 @@
use crate::Error;
use log::debug;
use serde::Deserialize;
use sqlx::postgres::PgConnectOptions;
use tokio::fs::read_to_string;
@ -22,11 +23,12 @@ pub struct Database {
struct WebBuilder {
url: Option<String>,
port: Option<u16>,
ssl: Option<bool>,
_ssl: Option<bool>,
}
impl ConfigBuilder {
pub async fn load(path: String) -> Result<Self, Error> {
debug!("loading config from: {}", path);
let raw = read_to_string(path).await?;
let config = toml::from_str(&raw)?;