Versions in this module Expand all Collapse all v0 v0.4.0 Sep 29, 2026 Changes in this version + const LogVersion + const MaxErr + const MaxField + const MaxText + func Sanitize(s string, max int) string + func Suspend(ctx context.Context) (resume func()) + func Tee(ctx context.Context, w io.Writer, st Stream, parse func(Stream, string)) io.Writer + func WithBus(ctx context.Context, b *Bus) context.Context + type Bus struct + func BusFrom(ctx context.Context) *Bus + func NewBus(o Options) *Bus + func (b *Bus) Close() + func (b *Bus) Trace() TraceID + func (b *Bus) TraceContext() TraceContext + type Class uint8 + const ClassAuth + const ClassCanceled + const ClassNone + const ClassPin + const ClassTarget + const ClassTimeout + const ClassTransport + const ClassUsage + func Classify(err error, fallback func(error) Class) Class + func (c Class) String() string + type Classifier interface + ProgressClass func() Class + type Count struct + Batch string + Canceled int + Done int + Failed int + Flags Flags + Name string + Queued int + Running int + Skipped int + Span SpanID + Targets int + Total int + Waits int + type Event struct + Class Class + Dropped int + Err string + Flags Flags + Kind Kind + Name string + Parent SpanID + Seq uint64 + Span SpanID + State State + Status Status + Stream Stream + Text string + Time time.Time + Type Type + type Fields struct + Batch string + Cache string + Exit *int + HTTPStatus int + Host string + Limit int + Message string + Method string + Node string + Path string + Role string + Source string + Timeout time.Duration + Total int + type Flags uint8 + const DryRun + const Fold + const Hidden + const ShowLines + func (f Flags) String() string + type Kind uint8 + const KindBatch + const KindCall + const KindCommand + const KindStep + const KindTarget + const KindWait + func (k Kind) String() string + type LineSink interface + WantsLines func() bool + type Log struct + func NewLog(w io.Writer, o LogOptions) *Log + func (l *Log) Begin(tc TraceContext) + func (l *Log) Close() error + func (l *Log) Handle(e Event) + func (l *Log) WantsLines() bool + type LogOptions struct + CloseWait time.Duration + FlushEvery time.Duration + Program string + Run string + Version string + type Option func(*options) + func Batch(i, n int) Option + func Cache(s string) Option + func Exit(code int) Option + func HTTP(method, path string) Option + func HTTPStatus(code int) Option + func Host(s string) Option + func Limit(n int) Option + func Message(s string) Option + func Node(s string) Option + func Queued() Option + func Role(s string) Option + func Source(s string) Option + func Timeout(d time.Duration) Option + func Total(n int) Option + func WithFlags(f Flags) Option + type Options struct + Classify func(error) Class + Now func() time.Time + PanicLog io.Writer + Parent SpanID + Program string + Sinks []Sink + Trace TraceID + TraceFlags byte + TraceState string + type Sink interface + Handle func(Event) + type Span struct + func SpanFrom(ctx context.Context) *Span + func Start(ctx context.Context, k Kind, name string, opts ...Option) (context.Context, *Span) + func (s *Span) End(err error, opts ...Option) + func (s *Span) Run() + func (s *Span) Skip(reason string) + func (s *Span) Update(opts ...Option) + type SpanID uint64 + func (s SpanID) String() string + type State uint8 + const StateEnded + const StateQueued + const StateRunning + func (s State) String() string + type Status uint8 + const StatusCanceled + const StatusFailed + const StatusOK + const StatusSkipped + func (s Status) String() string + type Stream uint8 + const Stderr + const Stdout + func (s Stream) String() string + type Suspender interface + Resume func() + Suspend func() + type Tally struct + func (t *Tally) Add(e Event) (ended Count, ok bool) + func (t *Tally) Count(span SpanID) (Count, bool) + func (t *Tally) Roots() []Count + type TraceContext struct + Flags byte + Parent SpanID + State string + Trace TraceID + func ParseTraceContext(traceparent, tracestate string) (tc TraceContext, ok bool) + type TraceID [16]byte + func (t TraceID) String() string + type TraceSink interface + Begin func(TraceContext) + type Type uint8 + const TypeEnd + const TypeLine + const TypeResume + const TypeRun + const TypeStart + const TypeSuspend + const TypeUpdate + func (t Type) String() string