Documentation
¶
Overview ¶
Package diagnostics persists bounded structured logs and exports local runtime diagnostics.
Index ¶
- func Error(err error) slog.Attr
- func ID(value string) string
- func MediaLogger(scope string) medialog.Logger
- func PionLoggerFactory(fields ...any) logging.LoggerFactory
- func ReplaceAttr(_ []string, attr slog.Attr) slog.Attr
- func SafeText(text string) string
- type LineWriter
- type Recorder
- func (r *Recorder) Binary(name, path string)
- func (r *Recorder) Close() error
- func (r *Recorder) Context(name string, value any)
- func (r *Recorder) Export() (path string, returnedErr error)
- func (r *Recorder) LastExportPath() string
- func (r *Recorder) LogPath() string
- func (r *Recorder) Logger() *slog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MediaLogger ¶
func PionLoggerFactory ¶
func PionLoggerFactory(fields ...any) logging.LoggerFactory
func ReplaceAttr ¶
ReplaceAttr applies the same secret policy to application and dependency records.
Types ¶
type LineWriter ¶
type LineWriter struct {
// contains filtered or unexported fields
}
LineWriter turns dependency stderr into bounded records without writing on the TUI.
func Writer ¶
func Writer(scope string) *LineWriter
func (*LineWriter) Close ¶
func (writer *LineWriter) Close() error
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func Open ¶
Open appends to the component's current log, retaining one rotated backup. Callers own the directory choice and must pass sanitized structured events.
func (*Recorder) Binary ¶
Binary records only the identity of an explicitly selected runtime executable.
func (*Recorder) Close ¶
Close waits for an export already in progress. It is safe to call repeatedly.
func (*Recorder) Context ¶
Context snapshots explicitly selected startup facts; it never reads environment files.
func (*Recorder) Export ¶
Export retains useful evidence even when an optional collector fails. It never forces GC or collects raw process memory, media or arbitrary directory contents.
func (*Recorder) LastExportPath ¶ added in v1.4.0
LastExportPath returns the latest successfully closed archive, including after Close.