Config loading logs spurious "Failed to load config" at Info level #27

Closed
opened 2026-03-02 01:29:58 +01:00 by clawbot · 2 comments
Collaborator

Bug

When running without a config.yaml file (common for env-var-only deployments and Docker), five identical messages are logged at Info level on every startup:

{"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"}
{"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"}
{"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"}
{"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"}
{"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"}

This comes from pkg/config and is confusing because:

  1. It says "Failed" which implies an error, but the app works fine without a config file
  2. It appears 5 times (presumably once per config key lookup)
  3. It's at Info level, polluting normal startup logs

Fix

Either:

  1. Change these to Debug level so they only appear when DEBUG=true
  2. Check for config file existence once at startup and only log one message
  3. Suppress the message entirely when no config file is expected (env-var-only mode)

Category

Nice-to-have. Cosmetic but affects operational clarity.

## Bug When running without a `config.yaml` file (common for env-var-only deployments and Docker), five identical messages are logged at Info level on every startup: ```json {"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"} {"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"} {"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"} {"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"} {"level":"INFO","msg":"Failed to load config: configuration file config.yaml not found in directory tree"} ``` This comes from `pkg/config` and is confusing because: 1. It says "Failed" which implies an error, but the app works fine without a config file 2. It appears 5 times (presumably once per config key lookup) 3. It's at Info level, polluting normal startup logs ## Fix Either: 1. Change these to Debug level so they only appear when DEBUG=true 2. Check for config file existence once at startup and only log one message 3. Suppress the message entirely when no config file is expected (env-var-only mode) ## Category Nice-to-have. Cosmetic but affects operational clarity.
clawbot added the
bot
label 2026-03-02 01:29:58 +01:00
Owner

let’s get rid of file-based configuration entirely.

let’s get rid of file-based configuration entirely.
Author
Collaborator

Understood — removing file-based configuration entirely. Env vars only, no Viper, no config.yaml. Will implement after the current delivery engine worker pool rework completes (same branch).

Understood — removing file-based configuration entirely. Env vars only, no Viper, no config.yaml. Will implement after the current delivery engine worker pool rework completes (same branch).
sneak closed this issue 2026-03-04 01:19:43 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/webhooker#27
No description provided.