Documentation ¶
Index ¶
- func NewTrace2() traceLoggerInternal
- func WithTraceLogger(ctx context.Context, mainFunc func(context.Context, TraceLogger))
- type Trace2
- func (t *Trace2) ChildProcess(ctx context.Context, cmd *exec.Cmd) (func(error), func())
- func (t *Trace2) Error(ctx context.Context, err error) error
- func (t *Trace2) Errorf(ctx context.Context, format string, a ...any) error
- func (t *Trace2) Exit(ctx context.Context, exitCode int)
- func (t *Trace2) Fatal(ctx context.Context, err error)
- func (t *Trace2) Fatalf(ctx context.Context, format string, a ...any)
- func (t *Trace2) LogCommand(ctx context.Context, commandName string) context.Context
- func (t *Trace2) Region(ctx context.Context, category string, label string) (context.Context, func())
- type TraceLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTraceLogger ¶
func WithTraceLogger( ctx context.Context, mainFunc func(context.Context, TraceLogger), )
Types ¶
type Trace2 ¶
type Trace2 struct {
// contains filtered or unexported fields
}
func (*Trace2) ChildProcess ¶
func (*Trace2) LogCommand ¶
type TraceLogger ¶
type TraceLogger interface { Region(ctx context.Context, category string, label string) (context.Context, func()) ChildProcess(ctx context.Context, cmd *exec.Cmd) (func(error), func()) LogCommand(ctx context.Context, commandName string) context.Context Error(ctx context.Context, err error) error Errorf(ctx context.Context, format string, a ...any) error Exit(ctx context.Context, exitCode int) Fatal(ctx context.Context, err error) Fatalf(ctx context.Context, format string, a ...any) }
Click to show internal directories.
Click to hide internal directories.