feat(common): centralized logging module for DAW projects #95

Closed
opened 2026-05-28 06:23:34 +02:00 by michael · 1 comment
Owner

Goal

Introduce a centralized logging module for DAW projects that replaces
scattered out:write / io.stderr calls with a unified API.

Requirements

  • Log levels: debug, info, warn, error
  • Output targets: stdout, stderr, file
  • Enable/disable per level at runtime
  • Single require, available in every DAW program
  • Configurable via program config (e.g. fragjan.conf [logging] section)

Open questions

  • Where does the module live? daw.common.log or daw.common.logger?
  • How is the logger passed around -- global, singleton, or injected?
  • File logging: rotate? append only?
  • Format: timestamp, level, module name, message?
  • Integration with existing out (daw.common.sys) -- replace or wrap?

See also

## Goal Introduce a centralized logging module for DAW projects that replaces scattered out:write / io.stderr calls with a unified API. ## Requirements - Log levels: debug, info, warn, error - Output targets: stdout, stderr, file - Enable/disable per level at runtime - Single require, available in every DAW program - Configurable via program config (e.g. fragjan.conf [logging] section) ## Open questions - Where does the module live? daw.common.log or daw.common.logger? - How is the logger passed around -- global, singleton, or injected? - File logging: rotate? append only? - Format: timestamp, level, module name, message? - Integration with existing out (daw.common.sys) -- replace or wrap? ## See also - DAW/fragjan#90 (output via adapters/ui -- related)
michael added this to the Basic Version milestone 2026-05-30 16:08:42 +02:00
Author
Owner

Closing -- superseded by current architecture

daw.common.log was planned as a producer that builds daw_log/v1 tables
and forwards them to adapters/log. This is no longer needed.

The current solution: callers build daw_log/v1 entries inline and call
adapters/log.write() directly (see emit_log() in core/runner/file.lua).
The entry format is simple enough (4 fields) that a dedicated module
adds no value.

With mainjan on the horizon, logging will be discovered via capability
lookup -- making a central daw.common.log module even less relevant.

Closing in favor of DAW/fragjan#118 (adapters/log) and DAW/fragjan#97.

## Closing -- superseded by current architecture daw.common.log was planned as a producer that builds daw_log/v1 tables and forwards them to adapters/log. This is no longer needed. The current solution: callers build daw_log/v1 entries inline and call adapters/log.write() directly (see emit_log() in core/runner/file.lua). The entry format is simple enough (4 fields) that a dedicated module adds no value. With mainjan on the horizon, logging will be discovered via capability lookup -- making a central daw.common.log module even less relevant. Closing in favor of DAW/fragjan#118 (adapters/log) and DAW/fragjan#97.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
DAW/fragjan#95
No description provided.