concept: DAW observability stack -- logging, debug, hailjan #97
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type/architecture
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
type/task
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/fragjan#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Define the DAW observability stack as a coherent concept before
implementing individual components.
Components
Open questions
Next steps
See also
Concept clarification
Architecture decision
daw.common.loghas a single responsibility: format and forward.It calls only
adapters/log-- the adapter decides where output goes.Answers to open questions
How do logging and hailjan relate? Is hailjan a log sink?
No. hailjan is a contract observer, not a log sink. It writes anomalies
to
var/hailjan/anomalies.jsonlindependently. No coupling todaw.common.logoradapters/log.Single module daw.common.log with debug as a level, or separate?
Single module. DEBUG is a level like INFO/WARN/ERROR (see daw-project-standard).
DAW/fragjan#96 (debug module) should be re-evaluated -- likely not needed
as a separate module.
How does log state flow through programs?
Via
ctx.adapters/logis initialized at startup and passed throughctxto all callers. No singleton, no global.What is the wire format between programs and hailjan?
Not applicable -- hailjan is not a log consumer.
hailjan writes
var/hailjan/anomalies.jsonlindependently.File logging in daw.common.log vs. hailjan as the file/remote sink?
File logging belongs to
adapters/log. Pattern followsadapters/storage:adapter defines the contract, backend implements it (file today, remote later).
DAW_DEBUG env var vs. --debug flag vs. config file?
--debugflag already exists in fragjan. Value flows viactx.No DAW_DEBUG env var -- env access is restricted to
bin/wrappervia sys.lua(see daw-project-standard, environment access rule).
Revised component overview
Dependencies
Next step
Define
adapters/logcontract (required_ops, _contracts) as foundationfor DAW/fragjan#95.
adapters/log contract definition
Architecture decision
adapters/log is a standard interface adapter following the adapters/storage pattern.
Concrete log backends attach as DAW modules. The UI target is a special case --
adapters/log calls adapters/ui directly, no module in between.
Routing model
Each target is optional. If the config section is absent, the target is inactive.
Required operations
Level filtering
Each target defines its minimum level independently via config.
adapters/log filters per target before dispatching.
Config structure (fragjan.conf)
[logging.debug]is a second instance of daw.log.file -- not a special case.[logging.ui]routes to adapters/ui directly, no module.Module interface (daw.log.*)
Modules implement:
First module: DAW/daw-modul-log-file (DAW/fragjan#117)
Startup behavior
adapters/log is initialized in main.lua as one of the first steps,
before ctx is fully built.
On open() failure (missing module, bad config):
If no [logging.*] section is configured: adapters/log is inactive,
no error, no output. Intentional zero-logging is valid.
Next steps