Documentation
¶
Overview ¶
Package diaglog provides bounded, non-blocking JSONL diagnostic recording shared by the desktop host and CLI with a single dropped-record counter.
Index ¶
Constants ¶
const (
DefaultQueueCapacity = 1024
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder writes bounded asynchronous JSONL diagnostic records off transfer goroutines, tracking all queue/encode/upstream loss with one dropped counter.
func Disabled ¶
Disabled retains a startup failure without making diagnostics an admission dependency. No queue or writer goroutine is started.
func OpenRotating ¶
OpenRotating creates a rotating host support log (`host-*.jsonl`) bounded in both per-file size and retained file count.
func OpenRun ¶
func OpenRun(target Target, command string, opts RunOptions) (*Recorder, error)
OpenRun creates a single owner-only NDJSON trace file for one CLI invocation.
func (*Recorder) AddDropped ¶
AddDropped merges upstream non-blocking buffer drops into the single dropped counter.
func (*Recorder) CloseRun ¶
CloseRun flushes, writes the terminal summary, syncs once, and returns final counts.
type RunOptions ¶
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
Target couples the no-clobber policy to the file or directory namespace selected by the caller.
func RunDirectory ¶
RunDirectory generates a unique file per invocation inside directory.