Skip to content

Commit 4a05178

Browse files
committed
fix: add context for config load failure
1 parent 6aec0dc commit 4a05178

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ async fn health() -> Result<impl Responder, ApiError> {
4444

4545
#[tokio::main]
4646
async fn main() -> anyhow::Result<()> {
47-
log4rs::init_file("config/log4rs.yaml", Default::default())?;
47+
log4rs::init_file("config/log4rs.yaml", Default::default())
48+
.map_err(|e| e.context("Failed to read log4rs config"))?;
4849

4950
let env_url = dotenvy::var("DATABASE_URL")?;
5051

0 commit comments

Comments
 (0)