runlog

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package runlog provides the execution log: a timestamped, append-style record of everything a run did (configuration, every package analyzed, every finding, errors, final summary). It is deliberately separate from the report — the report answers "what is the risk state of my dependencies"; the execution log answers "what exactly did this run do", which is what you attach to a CI artifact or an incident timeline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger writes execution events to an optional file and, in verbose mode, mirrors them to stderr. Safe for concurrent use (results arrive from the worker pool in completion order).

func New

func New(path string, verbose bool) (*Logger, error)

New creates a Logger. path may be empty (no file); verbose mirrors every event to stderr in addition to the file.

func (*Logger) Close

func (l *Logger) Close()

Close flushes and closes the underlying file, if any.

func (*Logger) Enabled

func (l *Logger) Enabled() bool

Enabled reports whether the logger will record anything at all.

func (*Logger) Event

func (l *Logger) Event(level, format string, args ...any)

Event records one line: RFC3339 timestamp, level, formatted message. Levels used by sandtrap: INFO (run lifecycle), PKG (per-package outcome), FIND (individual finding), WARN (fetch/analysis errors).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL