Skip to content

Configurable log verbosity — replace debug toggle with log level dropdown #252

@nitrobass24

Description

@nitrobass24

Summary

Replace the binary debug toggle (on/off) with a configurable log level selector supporting all standard Python log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL.

Motivation

The current logging config is a boolean — config.general.debug toggles between INFO and DEBUG. Users have no way to set WARNING/ERROR/CRITICAL levels to reduce log noise in production, or to fine-tune verbosity.

Current State

  • config.general.debug (bool) — True = DEBUG, False = INFO
  • CLI --debug flag overrides the config value
  • Logging supports standard and JSON formats (already configurable)
  • Multiprocess logging already works via QueueHandler

Implementation

Config change (clean break)

  • Remove debug property from Config.General
  • Add log_level string property (values: DEBUG, INFO, WARNING, ERROR, CRITICAL)
  • Default: INFO
  • The config parser already silently ignores unknown keys, so existing debug = True lines in old config files won't crash on upgrade — they'll just be ignored, and log_level defaults to INFO

Python backend

  • Update Seedsync._create_logger() to use config.general.log_level instead of the debug boolean
  • Update --debug CLI flag to set log_level = DEBUG (backward compat for CLI users)
  • Update multiprocess log level propagation

Angular UI

  • Replace the "Enable Debug" checkbox in the Logging section with a "Log Level" dropdown
  • Choices: DEBUG, INFO, WARNING, ERROR, CRITICAL
  • Update Config.General interface and DEFAULT_GENERAL

Config serialization

  • Update serialize_config.py and tests

Acceptance Criteria

  • debug bool removed from config, replaced with log_level string
  • Default is INFO; old configs with debug key don't crash on startup
  • UI shows dropdown with all 5 log levels in Logging section
  • --debug CLI flag still works (sets log_level to DEBUG)
  • All log levels work correctly (verified with each level)
  • Tests updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions