feat(module): daw.log.file -- file log backend module #117

Closed
opened 2026-06-03 08:38:38 +02:00 by michael · 0 comments
Owner

Goal

Implement the first DAW log backend module: daw.log.file.
Writes daw_log/v1 entries to a file. Follows the daw.log.* module interface
defined in DAW/fragjan#97.

Module interface

open(config)   -> true|nil, err
write(entry)   -> true|nil, err   -- entry is daw_log/v1 table
close()        -> nil

Config fields (from logging.* section in fragjan.conf)

path  = var/log/fragjan.log   -- required
level = info                  -- handled by adapters/log, not this module

Level filtering is adapters/log responsibility -- this module always writes
what it receives.

Output format

One line per entry. Format decided during implementation.
Candidate:

2026-05-28T10:00:00Z [INFO] core.runner.file: pack not found: daw-lua-code

Acceptance criteria

  • Implements open/write/close interface
  • Follows DAW nil/err return standard
  • No direct io.open in module -- uses daw.common.fs
  • test/test_log_file.lua covers open, write, close
  • module.conf with provides = { "log" }

Repo

DAW/daw-modul-log-file (new repo, follows daw-module-standard)

Dependencies

  • DAW/fragjan#97 -- adapters/log contract (defines module interface)
  • DAW/daw-lua-common -- fs.lua for file I/O
## Goal Implement the first DAW log backend module: daw.log.file. Writes daw_log/v1 entries to a file. Follows the daw.log.* module interface defined in DAW/fragjan#97. ## Module interface ```lua open(config) -> true|nil, err write(entry) -> true|nil, err -- entry is daw_log/v1 table close() -> nil ``` ## Config fields (from logging.* section in fragjan.conf) ```ini path = var/log/fragjan.log -- required level = info -- handled by adapters/log, not this module ``` Level filtering is adapters/log responsibility -- this module always writes what it receives. ## Output format One line per entry. Format decided during implementation. Candidate: ``` 2026-05-28T10:00:00Z [INFO] core.runner.file: pack not found: daw-lua-code ``` ## Acceptance criteria - [ ] Implements open/write/close interface - [ ] Follows DAW nil/err return standard - [ ] No direct io.open in module -- uses daw.common.fs - [ ] test/test_log_file.lua covers open, write, close - [ ] module.conf with provides = { "log" } ## Repo DAW/daw-modul-log-file (new repo, follows daw-module-standard) ## Dependencies - DAW/fragjan#97 -- adapters/log contract (defines module interface) - DAW/daw-lua-common -- fs.lua for file I/O
michael added this to the Basic Version milestone 2026-06-04 11:29:47 +02:00
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#117
No description provided.